Subject: Re: [PATCH 3/3] merge-ort: support having merge verbosity be set to 0

From: Taylor Blau <[email-masked]>
Date: Wed, 12 Mar 2025 16:03:48 -0400

On Fri, Mar 07, 2025 at 03:48:42PM +0000, Elijah Newren via GitGitGadget wrote:
> From: Elijah Newren <[email-masked]>
>
> 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 <[email-masked]>
> ---
>  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;

Looks trivially correct ;-). Should we add a test to ensure that we
don't regress this behavior in the future?

Thanks,
Taylor