diff --git a/log-tree.c b/log-tree.c index 33eb96b50c58b1..3dce6bd9c15bc9 100644 --- a/log-tree.c +++ b/log-tree.c @@ -1025,6 +1025,7 @@ static int do_remerge_diff(struct rev_info *opt, init_ui_merge_options(&o, the_repository); o.show_rename_progress = 0; o.record_conflict_msgs_as_headers = 1; + o.suppress_conflict_labels = 1; o.msg_header_prefix = "remerge"; ctx.abbrev = DEFAULT_ABBREV; diff --git a/merge-ort.c b/merge-ort.c index 8b81153e8fe0f5..621ede6700cf09 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -2085,7 +2085,11 @@ static int merge_3way(struct merge_options *opt, } assert(pathnames[0] && pathnames[1] && pathnames[2] && opt->ancestor); - if (pathnames[0] == pathnames[1] && pathnames[1] == pathnames[2]) { + if (opt->suppress_conflict_labels) { + base = xstrdup(""); + name1 = xstrdup(""); + name2 = xstrdup(""); + } else if (pathnames[0] == pathnames[1] && pathnames[1] == pathnames[2]) { base = mkpathdup("%s", opt->ancestor); name1 = mkpathdup("%s", opt->branch1); name2 = mkpathdup("%s", opt->branch2); diff --git a/merge-recursive.h b/merge-recursive.h index 0b91f28f902279..b4b0fb0c4021c7 100644 --- a/merge-recursive.h +++ b/merge-recursive.h @@ -48,6 +48,7 @@ struct merge_options { const char *subtree_shift; unsigned renormalize : 1; unsigned record_conflict_msgs_as_headers : 1; + unsigned suppress_conflict_labels : 1; const char *msg_header_prefix; /* internal fields used by the implementation */