summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index ad9f9211b3..518ebe0347 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -537,7 +537,7 @@ static int parse_and_validate_options(int argc, const char *argv[],
die("Option -m cannot be combined with -c/-C/-F.");
if (edit_message)
use_message = edit_message;
- if (amend)
+ if (amend && !use_message)
use_message = "HEAD";
if (use_message) {
unsigned char sha1[20];