Code

add reflog when moving HEAD to a new branch
authorNicolas Pitre <nico@cam.org>
Fri, 26 Jan 2007 22:26:11 +0000 (17:26 -0500)
committerJunio 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

index ac378cdb1e7365758bb9309b92a6def77e593ef0..1349e77f32157cc63fba6644ae2112c21ec5264e 100755 (executable)
@@ -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