]> git.ipfire.org Git - thirdparty/git.git/commitdiff
merge-ort: mark conflict/warning messages from inner merges as omittable
authorElijah Newren <newren@gmail.com>
Wed, 2 Feb 2022 02:37:36 +0000 (02:37 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Feb 2022 18:02:28 +0000 (10:02 -0800)
A recursive merge involves merging the merge bases of the two branches
being merged.  Such an inner merge can itself generate conflict notices.
While such notices may be useful when initially trying to create a
merge, they seem to just be noise when investigating merges later with
--remerge-diff.  (Especially when both sides of the outer merge resolved
the conflict the same way leading to no overall conflict.)  Remove them.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-ort.c

index 43f980d2586364d9828d2d532fa153b1b5eadca3..9bf15a01db8d892cb3fc854253c0466401f10522 100644 (file)
@@ -638,7 +638,9 @@ static void path_msg(struct merge_options *opt,
        struct strbuf tmp = STRBUF_INIT;
 
        if (opt->record_conflict_msgs_as_headers && omittable_hint)
-               return; /* Do not record mere hints in tree */
+               return; /* Do not record mere hints in headers */
+       if (opt->record_conflict_msgs_as_headers && opt->priv->call_depth)
+               return; /* Do not record inner merge issues in headers */
        sb = strmap_get(&opt->priv->output, path);
        if (!sb) {
                sb = xmalloc(sizeof(*sb));