X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-commit.sh;h=1e7c09e1f2fdf3b4327c903084bd86616b7956f1;hb=f1250edff5356cba7d8e71ec68418a4233b8bed0;hp=d9ec1f14d9ec3336c4c772d0c03f30d5f1511d56;hpb=6f85a78df69d84d06eef53288c3c303109f8644e;p=git.git diff --git a/git-commit.sh b/git-commit.sh index d9ec1f14..1e7c09e1 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -161,7 +161,7 @@ run_status () { } ' - if test -n "$verbose" + if test -n "$verbose" -a -z "$IS_INITIAL" then git-diff-index --cached -M -p --diff-filter=MDTCRA $REFERENCE fi @@ -609,7 +609,7 @@ fi test -z "$only_include_assumed" || echo "$only_include_assumed" run_status } >>"$GIT_DIR"/COMMIT_EDITMSG -if [ "$?" != "0" -a ! -f "$GIT_DIR/MERGE_HEAD" ] +if [ "$?" != "0" -a ! -f "$GIT_DIR/MERGE_HEAD" -a -z "$amend" ] then rm -f "$GIT_DIR/COMMIT_EDITMSG" run_status