summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3803bce)
raw | patch | inline | side by side (parent: 3803bce)
author | Dmitry V. Levin <ldv@altlinux.org> | |
Wed, 12 Sep 2007 16:14:22 +0000 (20:14 +0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 Sep 2007 17:50:27 +0000 (10:50 -0700) |
Right now one can amend the last non-merge commit using a dirty index
and in the process maybe cause the last commit to have the same tree
as its parent. In such a case one would want to discard the last commit
instead of amending it.
This reverts commit 8588452ceb78b1da17652ba03f9942ef740e07ea.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
and in the process maybe cause the last commit to have the same tree
as its parent. In such a case one would want to discard the last commit
instead of amending it.
This reverts commit 8588452ceb78b1da17652ba03f9942ef740e07ea.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-commit.sh | patch | blob | history |
diff --git a/git-commit.sh b/git-commit.sh
index 1d04f1ff31cf99a6dec1d52866668007ab2dae72..41538f16e5dd8a6dea55933fa32926d758d24ea0 100755 (executable)
--- a/git-commit.sh
+++ b/git-commit.sh
# we need to check if there is anything to commit
run_status >/dev/null
fi
-if [ "$?" != "0" -a ! -f "$GIT_DIR/MERGE_HEAD" -a -z "$amend" ]
+if [ "$?" != "0" -a ! -f "$GIT_DIR/MERGE_HEAD" ]
then
rm -f "$GIT_DIR/COMMIT_EDITMSG" "$GIT_DIR/SQUASH_MSG"
use_status_color=t