Re: [PATCH 3/9] merge-ort: capture and print ll-merge warnings in our preferred fashion

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

 



On Tue, Dec 21, 2021 at 4:00 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> "Elijah Newren via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
>
> > From: Elijah Newren <newren@xxxxxxxxx>
> >
> > Instead of immediately printing ll-merge warnings to stderr, we save
> > them in our output strbuf.  Besides allowing us to move these warnings
> > to a special file for --remerge-diff, this has two other benefits for
> > regular merges done by merge-ort:
> >
> >   * The deferral of messages ensures we can print all messages about
> >     any given path together (merge-recursive was known to sometimes
> >     intersperse messages about other paths, particularly when renames
> >     were involved).
>
> I would imagine that with something like this, we can show such a
> warning message differently when it happens during an inner
> "synthesizing a virtual common ancestor" merge (the most likely
> value for "show differently" would be to "squelch"), which may be a
> good thing.

Yes, that is a possibility that opens up after this.  Which reminds
me, merge-recursive nicely nested conflict/warnings messages from
inner merges by adding 2*call_depth space characters before messages.
I lost that in merge-ort (which becomes more problematic since
merge-ort tries to group messages about the same path together, thus
mixing inner merge messages with outer ones and providing no way to
differentiate the two).  I've got a patch to fix that up, but of
course it conflicts with this series, so I'll be submitting it after
this one settles.

> >       if (merge_status == LL_MERGE_BINARY_CONFLICT)
> > -             warning("Cannot merge binary files: %s (%s vs. %s)",
> > -                     path, name1, name2);
> > +             path_msg(opt, path, 0,
> > +                      "warning: Cannot merge binary files: %s (%s vs. %s)",
> > +                      path, name1, name2);
> >
>
> Nice.



[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