Re: [PATCH 09/12] merge-tree: provide a list of which files have conflicts
- From
Elijah Newren <newren@gmail.com>
- Date
- Jan 29, 2022, 06:21 UTC
- Message-ID
- <CABPp-BEn=fvmTyYEzjSfvKkYyHj0te=6ck6WF+Jor+L1jKrVkg@mail.gmail.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.2201281755200.347@tvgsbejvaqbjf.bet>
On Fri, Jan 28, 2022 at 8:57 AM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 7 quoted lines
> > Hi Elijah, > > On Sat, 22 Jan 2022, Elijah Newren via GitGitGadget wrote: > > > From: Elijah Newren <newren@gmail.com> > >
[...]
Show 14 quoted lines
> > diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt > > index fd7a867de60..041a4ac2785 100644 > > --- a/Documentation/git-merge-tree.txt > > +++ b/Documentation/git-merge-tree.txt > > @@ -58,6 +58,7 @@ simply one line: > > Whereas for a conflicted merge, the output is by default of the form: > > > > <OID of toplevel tree> > > + <Conflicted file list> > > <Informational messages> > > To distinguish between the list of conflicted files and the informational > messages, I think it would be good to insert an empty line, as a > separator, like.
Yes, I agree; that's why I did so. :-)
[...]
> > if (o->show_messages) {
> > printf("\n");
>
> ... it seems that we do this already...Yep.
[...]
Show 16 quoted lines
> > diff --git a/t/t4301-merge-tree-real.sh b/t/t4301-merge-tree-real.sh > > index c34f8e6c1ed..43c9950dedb 100755 > > --- a/t/t4301-merge-tree-real.sh > > +++ b/t/t4301-merge-tree-real.sh > > @@ -94,6 +94,8 @@ test_expect_success 'test conflict notices and such' ' > > # "whatever" has *both* a modify/delete and a file/directory conflict > > cat <<-EOF >expect && > > HASH > > + greeting > > + whatever~side1 > > > > Auto-merging greeting > > CONFLICT (content): Merge conflict in greeting > > ... as illustrated by the test, too. I guess the documentation should show > the empty line, too?
It does:
Informational messages
~~~~~~~~~~~~~~~~~~~~~~ This always starts with a blank line to separate it from the previous
sections, and then has free-form messages about the merge, such as:The newline should not be split out separately, because --no-messages suppresses the newline. (Without the messages section, the newline isn't needed.)