diff mbox series

[v4,09/10] merge-ort: mark conflict/warning messages from inner merges as omittable

Message ID b3e7656cfc6eee19c0868b94d69db0d7b622aedc.1642792341.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Add a new --remerge-diff capability to show & log | expand

Commit Message

Elijah Newren Jan. 21, 2022, 7:12 p.m. UTC
From: Elijah Newren <newren@gmail.com>

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>
---
 merge-ort.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/merge-ort.c b/merge-ort.c
index 43f980d2586..9bf15a01db8 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -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));