git-branch: add -r switch to list refs/remotes/*
[git.git] / git-commit.sh
index c9c22ab..d9ec1f1 100755 (executable)
@@ -595,12 +595,14 @@ then
                PARENTS=$(git-cat-file commit HEAD |
                        sed -n -e '/^$/q' -e 's/^parent /-p /p')
        fi
+       current=$(git-rev-parse --verify HEAD)
 else
        if [ -z "$(git-ls-files)" ]; then
                echo >&2 Nothing to commit
                exit 1
        fi
        PARENTS=""
+       current=
 fi
 
 {