X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-checkout.sh;h=17f43927aa7b766c1ba28150c4945fac7ff3e132;hb=154c7d0759b6885034bffa7a34d464d703fc8bb3;hp=e00b697fef66adecaade1b9f6e7b7600f822e251;hpb=e2b1accc59ab5d682d71fd801ebe959c3e871488;p=git.git diff --git a/git-checkout.sh b/git-checkout.sh index e00b697fe..17f43927a 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -259,7 +259,8 @@ if [ "$?" -eq 0 ]; then fi if test -n "$branch" then - GIT_DIR="$GIT_DIR" git symbolic-ref -m "checkout: moving to $branch" HEAD "refs/heads/$branch" + old_branch_name=`expr "z$oldbranch" : 'zrefs/heads/\(.*\)'` + GIT_DIR="$GIT_DIR" git symbolic-ref -m "checkout: moving from $old_branch_name to $branch" HEAD "refs/heads/$branch" if test -n "$quiet" then true # nothing