add reflog when moving HEAD to a new branch

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Nicolas Pitre 2007-01-26 17:26:11 -05:00 committed by Junio C Hamano
parent 47fc52e287
commit a7e4fbf990

View File

@ -250,7 +250,7 @@ if [ "$?" -eq 0 ]; then
fi
if test -n "$branch"
then
GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD "refs/heads/$branch"
GIT_DIR="$GIT_DIR" git-symbolic-ref -m "checkout: moving to $branch" HEAD "refs/heads/$branch"
elif test -n "$detached"
then
# NEEDSWORK: we would want a command to detach the HEAD