diff options
author | Nicolas Pitre <nico@cam.org> | 2007-02-03 21:50:39 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-03 23:06:27 -0800 |
commit | dc9195ac7830bdf08ee847ef6a385c0b8f673d69 (patch) | |
tree | 41c086969dd28ed7f606b08979341c935ddb215d /builtin-pack-objects.c | |
parent | Enable HEAD@{...} and make it independent from the current branch (diff) | |
download | tgif-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-pack-objects.c')
0 files changed, 0 insertions, 0 deletions