summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b4019f0)
raw | patch | inline | side by side (parent: b4019f0)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 3 Mar 2006 05:13:24 +0000 (21:13 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 3 Mar 2006 05:13:24 +0000 (21:13 -0800) |
An earlier commit 8098a178b26dc7a158d129a092a5b78da6d12b72
accidentally lost race protection from git-commit command.
This commit reinstates it. When something else updates HEAD
pointer while you were editing your commit message, the command
would notice and abort the commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
accidentally lost race protection from git-commit command.
This commit reinstates it. When something else updates HEAD
pointer while you were editing your commit message, the command
would notice and abort the commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-commit.sh | patch | blob | history |
diff --git a/git-commit.sh b/git-commit.sh
index c9c22abc5edb3a2d4a22907e1f5b26ca74812859..d9ec1f14d9ec3336c4c772d0c03f30d5f1511d56 100755 (executable)
--- a/git-commit.sh
+++ b/git-commit.sh
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
{