mirror of
https://github.com/git/git.git
synced 2024-11-25 02:44:48 +08: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 New Issue
Block a user