diff --git a/builtin/commit.c b/builtin/commit.c index 01b79185e7..9b6eaa3c72 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1332,7 +1332,7 @@ static int parse_and_validate_options(int argc, const char *argv[], else if (is_from_cherry_pick(whence)) die(_("You are in the middle of a cherry-pick -- cannot amend.")); else if (is_from_rebase_now_empty(whence)) - die(_("You are in the middle of a rebase -- cannot amend.")); + die(_("The now-empty commit has been dropped -- cannot amend.")); } if (fixup_message && squash_message) die(_("options '%s' and '%s' cannot be used together"), "--squash", "--fixup"); diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 17b30b7825..5a0aa93b10 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1851,7 +1851,7 @@ test_expect_success 'correct error message for commit --amend after empty pick' ) && echo x>file1 && test_must_fail git commit -a --amend 2>err && - test_grep "middle of a rebase -- cannot amend." err + test_grep "now-empty commit has been dropped -- cannot amend." err ' test_expect_success 'todo has correct onto hash' '