зеркало из https://github.com/microsoft/git.git
git-commit: make sure we protect against races.
An earlier commit 8098a178b2
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>
This commit is contained in:
Родитель
b4019f0456
Коммит
b8310152bc
|
@ -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
|
||||
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче