]> git.droids-corp.org - git-central.git/blobdiff - client/post-checkout-rebase
Reproduce and fix with gc-pull the merge replay problem.
[git-central.git] / client / post-checkout-rebase
index 40ee5233eb9e9eb2afe36f702da68f6e272dbc61..a0fc53314a5f1021c08192802c6cfda92aaeb09a 100644 (file)
@@ -5,14 +5,14 @@
 # whether the checkout was a branch checkout (changing branches, flag=1) or a
 # file checkout (retrieving a file from the index, flag=0).
 
-branch=$(git symbolic-ref --quiet HEAD)
-if [ $? -ne 0 ] ; then
+branch=$(git symbolic-ref HEAD 2>/dev/null)
+if [[ $? -ne 0 ]] ; then
        exit 0
 fi
 
 branch=${branch/refs\/heads\//}
+
 git config --list | grep "branch.${branch}.rebase" > /dev/null
 if [ $? -ne 0 ] ; then
        git config --add "branch.${branch}.rebase" true
 fi
-