Subject: [PATCH] merge-ort: exclude messages from inner merges by default

From: "Elijah Newren via GitGitGadget" <[email-masked]>
Date: Wed, 02 Mar 2022 04:19:21 +0000

From: Elijah Newren <[email-masked]>

merge-recursive would only report messages from inner merges when the
GIT_MERGE_VERBOSITY was set to 5.  Do the same for merge-ort.

Note that somewhat reverts 0d83d8240d ("merge-ort: mark conflict/warning
messages from inner merges as omittable", 2022-02-02) based on two
facts:

  * This commit basically removes the showing of messages from inner
    merges as well, at least by default.  The only difference is that
    users can request to get them back by turning up the verbosity.
  * Messages from inner merges are specially annotated since 4a3d86e1bb
    ("merge-ort: make informational messages from recursive merges
    clearer", 2022-02-17).  The ability to distinguish them from outer
    merge comments make them less problematic to include, and easier
    for humans to parse.

Signed-off-by: Elijah Newren <[email-masked]>
---
    merge-ort: exclude messages from inner merges by default
    
    cf. https://lore.kernel.org/git/[email-masked]/

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1167%2Fnewren%2Fmerge-ort-squelch-inner-msgs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1167/newren/merge-ort-squelch-inner-msgs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1167

 merge-ort.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/merge-ort.c b/merge-ort.c
index 55decb2587e..be85273c727 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -639,8 +639,9 @@ static void path_msg(struct merge_options *opt,
 
 	if (opt->record_conflict_msgs_as_headers && omittable_hint)
 		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 */
+	if (opt->priv->call_depth && opt->verbosity < 5)
+		return; /* Ignore messages from inner merges */
+
 	sb = strmap_get(&opt->priv->output, path);
 	if (!sb) {
 		sb = xmalloc(sizeof(*sb));

base-commit: 715d08a9e51251ad8290b181b6ac3b9e1f9719d7
-- 
gitgitgadget