]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/commit.c
Merge branch 'ds/maintenance-part-1'
[thirdparty/git.git] / builtin / commit.c
index f9b0a0c05d5881f6eb549a41d309611750640148..42b964e0cacd506203c3610e8830419dec11f260 100644 (file)
@@ -847,21 +847,19 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
                        if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS &&
                                !merge_contains_scissors)
                                wt_status_add_cut_line(s->fp);
-                       status_printf_ln(s, GIT_COLOR_NORMAL,
-                           whence == FROM_MERGE
-                               ? _("\n"
-                                       "It looks like you may be committing a merge.\n"
-                                       "If this is not correct, please remove the file\n"
-                                       "       %s\n"
-                                       "and try again.\n")
-                               : _("\n"
-                                       "It looks like you may be committing a cherry-pick.\n"
-                                       "If this is not correct, please remove the file\n"
-                                       "       %s\n"
-                                       "and try again.\n"),
+                       status_printf_ln(
+                               s, GIT_COLOR_NORMAL,
                                whence == FROM_MERGE ?
-                                       git_path_merge_head(the_repository) :
-                                       git_path_cherry_pick_head(the_repository));
+                                             _("\n"
+                                         "It looks like you may be committing a merge.\n"
+                                         "If this is not correct, please run\n"
+                                         "     git update-ref -d MERGE_HEAD\n"
+                                         "and try again.\n") :
+                                             _("\n"
+                                         "It looks like you may be committing a cherry-pick.\n"
+                                         "If this is not correct, please run\n"
+                                         "     git update-ref -d CHERRY_PICK_HEAD\n"
+                                         "and try again.\n"));
                }
 
                fprintf(s->fp, "\n");
@@ -1674,8 +1672,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
        }
 
        if (commit_tree_extended(sb.buf, sb.len, &active_cache_tree->oid,
-                                parents, &oid, author_ident.buf, sign_commit,
-                                extra)) {
+                                parents, &oid, author_ident.buf, NULL,
+                                sign_commit, extra)) {
                rollback_index_files();
                die(_("failed to write commit object"));
        }