summaryrefslogtreecommitdiff
path: root/git-checkout.sh
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-01-26 22:26:11 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-28 10:16:46 (GMT)
commita7e4fbf990290f955da1319ab605a59f85d3c3e2 (patch)
tree87d42483f313a65ae02075fc0c5efedf442a0e9e /git-checkout.sh
parent47fc52e2876ed3a54cd4b77e0b0c4875fa3317b8 (diff)
downloadgit-a7e4fbf990290f955da1319ab605a59f85d3c3e2.zip
git-a7e4fbf990290f955da1319ab605a59f85d3c3e2.tar.gz
git-a7e4fbf990290f955da1319ab605a59f85d3c3e2.tar.bz2
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>
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index ac378cd..1349e77 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -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