[PATCH 3/3] merge-ort: support having merge verbosity be set to 0
- From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Mar 7, 2025, 15:48 UTC
- Message-ID
- <c2a2be336e0ed7966b6ab0ef004f150537167b55.1741362522.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.1875.git.1741362522.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>
Various callers such as am & checkout set the merge verbosity to 0 to avoid having conflict messages printed. While this could be achieved by avoiding the wrappers from merge-ort-wrappers and instead passing 0 for display_update_msgs to merge_switch_to_result(), for simplicity of converting callers simply allow them to also achieve this with the merge-ort-wrappers by setting verbosity to 0.
Signed-off-by: Elijah Newren <newren@gmail.com> --- merge-ort.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/merge-ort.c b/merge-ort.c index a6960b6a1b4..8021083c112 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -799,6 +799,8 @@ static void path_msg(struct merge_options *opt, return; /* Do not record mere hints in headers */ if (opt->priv->call_depth && opt->verbosity < 5) return; /* Ignore messages from inner merges */ + if (!opt->verbosity) + return; /* Ensure path_conflicts (ptr to array of logical_conflict) allocated */ path_conflicts = strmap_get(&opt->priv->conflicts, primary_path);
-- gitgitgadget