]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-commit.c
Fix random sha1 in error message in http-fetch and http-push
[thirdparty/git.git] / builtin-commit.c
index ad9f9211b39af6cc7d1f319b6a8da7c514a33f12..518ebe0347e631c72f4e2a83b948259ee20fd213 100644 (file)
@@ -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];