Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
add reflog entries for HEAD when detached
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>
git-checkout.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
bd104db
)
diff --git
a/git-checkout.sh
b/git-checkout.sh
index 8500f51ea27054d328be6e7e53c9f14d0d9c1979..ac378cdb1e7365758bb9309b92a6def77e593ef0 100755
(executable)
--- a/
git-checkout.sh
+++ b/
git-checkout.sh
@@
-259,8
+259,9
@@
if [ "$?" -eq 0 ]; then
# 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