aboutsummaryrefslogtreecommitdiff
path: root/builtin-show-branch.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-02-03 21:50:39 -0500
committerJunio C Hamano <junkio@cox.net>2007-02-03 23:06:27 -0800
commitdc9195ac7830bdf08ee847ef6a385c0b8f673d69 (patch)
tree41c086969dd28ed7f606b08979341c935ddb215d /builtin-show-branch.c
parentf2eba66d4d1a664f40bcfd45e0b8a2670df222b3 (diff)
downloadgit-dc9195ac7830bdf08ee847ef6a385c0b8f673d69.tar.gz
git-dc9195ac7830bdf08ee847ef6a385c0b8f673d69.tar.xz
Let git-checkout always drop any detached head
We used to refuse leaving a detached HEAD when it wasn't matching an existing ref so not to lose any commit that might have been performed while not on any branch (unless -f was provided). But this protection was completely bogus since it was still possible to move to HEAD^ while still remaining detached but losing the last commit anyway if there was one. Now that we have a proper reflog for HEAD it is best to simply remove that bogus (and admitedly annoying) protection and simply display the last HEAD position instead. If one wants to recover a lost detached state then it can be retrieved from the HEAD reflog. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-show-branch.c')
0 files changed, 0 insertions, 0 deletions