summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bd104db)
raw | patch | inline | side by side (parent: bd104db)
author | Nicolas Pitre <nico@cam.org> | |
Fri, 26 Jan 2007 22:26:08 +0000 (17:26 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 28 Jan 2007 10:16:46 +0000 (02:16 -0800) |
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-checkout.sh | patch | blob | history |
diff --git a/git-checkout.sh b/git-checkout.sh
index 8500f51ea27054d328be6e7e53c9f14d0d9c1979..ac378cdb1e7365758bb9309b92a6def77e593ef0 100755 (executable)
--- a/git-checkout.sh
+++ b/git-checkout.sh
# git update-ref --detach HEAD $new
# or something like that...
#
- echo "$detached" >"$GIT_DIR/HEAD.new" &&
- mv "$GIT_DIR/HEAD.new" "$GIT_DIR/HEAD" ||
+ git-rev-parse HEAD >"$GIT_DIR/HEAD.new" &&
+ mv "$GIT_DIR/HEAD.new" "$GIT_DIR/HEAD" &&
+ git-update-ref -m "checkout: moving to $arg" HEAD "$detached" ||
die "Cannot detach HEAD"
if test -n "$detach_warn"
then