Re: [PATCH 4/9] merge-ort: mark a few more conflict messages as omittable

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

 



On Tue, Dec 21, 2021 at 4:06 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> "Elijah Newren via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
>
> > From: Elijah Newren <newren@xxxxxxxxx>
> >
> > path_msg() has the ability to mark messages as omittable, designed for
> > remerge-diff where we'll instead be showing conflict messages as diff
> > headers for a subsequent diff.  While all these messages are very useful
> > when trying to create a merge initially, early use with the
> > --remerge-diff feature (the only user of this omittable conflict message
> > capability), suggests that the particular messages marked in this commit
> > are just noise when trying to see what changes users made to create a
> > merge commit.
>
> It is likely because when somebody is looking at the output of
> remerge-diff, they are mostly concentrating on the _content_ level
> merges and they are not keenly looking for a merge whose result is
> deposited at a wrong path.  Since what is shown is something that
> has already recorded in the history, we can safely assume that it is
> no longer a relevant (or "it is way too late to matter"), I would
> say, to show these messages about "file location".
>
> > Signed-off-by: Elijah Newren <newren@xxxxxxxxx>
> > ---
> >  merge-ort.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/merge-ort.c b/merge-ort.c
> > index a18f47e23c5..fe27870e73e 100644
> > --- a/merge-ort.c
> > +++ b/merge-ort.c
> > @@ -2420,7 +2420,7 @@ static void apply_directory_rename_modifications(struct merge_options *opt,
> >                */
> >               ci->path_conflict = 1;
> >               if (pair->status == 'A')
> > -                     path_msg(opt, new_path, 0,
> > +                     path_msg(opt, new_path, 1,
> >                                _("CONFLICT (file location): %s added in %s "
> >                                  "inside a directory that was renamed in %s, "
> >                                  "suggesting it should perhaps be moved to "
> > @@ -2428,7 +2428,7 @@ static void apply_directory_rename_modifications(struct merge_options *opt,
> >                                old_path, branch_with_new_path,
> >                                branch_with_dir_rename, new_path);
> >               else
> > -                     path_msg(opt, new_path, 0,
> > +                     path_msg(opt, new_path, 1,
> >                                _("CONFLICT (file location): %s renamed to %s "
> >                                  "in %s, inside a directory that was renamed "
> >                                  "in %s, suggesting it should perhaps be "
> > @@ -3825,7 +3825,7 @@ static void process_entry(struct merge_options *opt,
> >                               reason = _("add/add");
> >                       if (S_ISGITLINK(merged_file.mode))
> >                               reason = _("submodule");
> > -                     path_msg(opt, path, 0,
> > +                     path_msg(opt, path, 1,
> >                                _("CONFLICT (%s): Merge conflict in %s"),
> >                                reason, path);
>
> I am not as sure about this one as the other two, though.  I guess
> in the context of remerge-diff, resolving the add/add conflict into
> the same file is also something that happened long time ago and
> these messages are too late to matter the same way as the other two.

Yeah, I'm not so sure about it either, and my notes are long, long
gone.  I think I'll pull this one out, and we can always tweak it
later if needed.



[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