]> source.dussan.org Git - jgit.git/commit
Checkout: fix handling if name does not refer to a local branch 39/2139/5
authorMathias Kinzler <mathias.kinzler@sap.com>
Mon, 20 Dec 2010 09:35:10 +0000 (10:35 +0100)
committerChris Aniszczyk <caniszczyk@gmail.com>
Mon, 20 Dec 2010 15:30:40 +0000 (09:30 -0600)
commit89a4dcf71ff3326aa6313b3a988b7721c3470858
treea5286f9b13d5d634f9bf2704f6a1996444a807c1
parent0c22243c4a59560529e7bd271094837c0fbf5295
Checkout: fix handling if name does not refer to a local branch

The CheckoutCommand does not handle names other than local branch
names properly; it must detach HEAD if such a name is encountered (for
example a commit ID or a remote tracking branch).

Change-Id: I5d55177f4029bcc34fc2649fd564b125a2929cc4
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java