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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 12, 2025 at 1:03 PM Taylor Blau <me@xxxxxxxxxxxx> wrote:
>
> On Fri, Mar 07, 2025 at 03:48:42PM +0000, Elijah Newren via GitGitGadget wrote:
> > From: Elijah Newren <newren@xxxxxxxxx>
> >
> > 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@xxxxxxxxx>
> > ---
> >  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 ;-).

Yeah, but after thinking about it more I don't like it here.  I don't
really like the opt->verbosity thing from merge-recursive, it simply
survived because it was a semi-public API, but I'd rather minimize it.
So, in the next round I think I'm going to stick this in the
merge-ort-wrappers rather than have it appear here.

> Should we add a test to ensure that we don't regress this behavior in the future?

I'd rather reuse `git {switch,checkout} -m`'s tests for this purpose
rather than adding new ones (and perhaps the ones from git-am; can't
remember if those also caught this).  If you feel strongly about this,
I'll just squash this into the later patch and make it bigger so we
don't need more redundant tests.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux