mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
git-commit --amend: allow empty commit.
When amending a commit only to update the commit log message, git-status would rightly say "Nothing to commit." Do not let this prevent commit to be made. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
1c7fee5d08
commit
8588452ceb
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue