BranchOperation: check for HEAD is too late
commit535bddafbce397aec062aa4e94cb9cc4d3fcf8f2
authorMathias Kinzler <mathias.kinzler@sap.com>
Thu, 8 Apr 2010 09:28:44 +0000 (8 11:28 +0200)
committerMathias Kinzler <mathias.kinzler@sap.com>
Thu, 8 Apr 2010 09:28:44 +0000 (8 11:28 +0200)
tree0409fe1b3e5fce0a032445fce9f657c7b1f1b0c1
parentb56662e4d430752f87b7c27eacb40fcd3c7a7599
BranchOperation: check for HEAD is too late

Unfortunately, BranchOperation does the
check for the degenerate checkout of HEAD
too late (in updateHeadRef during RefUpdate.link()),
after some Repository operations have  already been
performed. This leaves the repository in an
inconsistent state.
The check should instead be done right in
the beginning

Bug: 286743
org.eclipse.egit.core/src/org/eclipse/egit/core/CoreText.java
org.eclipse.egit.core/src/org/eclipse/egit/core/coretext.properties
org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java