Skip to content

Commit a7e4fbf

Browse files
Nicolas PitreJunio C Hamano
authored andcommitted
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>
1 parent 47fc52e commit a7e4fbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-checkout.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ if [ "$?" -eq 0 ]; then
250250
fi
251251
if test -n "$branch"
252252
then
253-
GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD "refs/heads/$branch"
253+
GIT_DIR="$GIT_DIR" git-symbolic-ref -m "checkout: moving to $branch" HEAD "refs/heads/$branch"
254254
elif test -n "$detached"
255255
then
256256
# NEEDSWORK: we would want a command to detach the HEAD

0 commit comments

Comments
 (0)