git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] merge-tree: accept 3 trees as arguments

From
Elijah Newren <newren@gmail.com>
Date
Jan 31, 2024, 16:34 UTC
Message-ID
<CABPp-BEDLsVFxjr13XJX9eBLeqD+tRoeHxwJyPsc_+AgGY2GTw@mail.gmail.com>
In-Reply-To
<xmqqbk92bv43.fsf@gitster.g>
On Tue, Jan 30, 2024 at 9:15 AM Junio C Hamano <gitster@pobox.com> wrote:
>
[...]
Show 35 quoted lines
> >>         opt.branch1 = branch1;
> >>         opt.branch2 = branch2;
> >
> > If branch1 and branch2 refer to trees, then when users hit conflicts
> > they'll see e.g.
> >
> > <<<<<<< aaaaaaa
> >   somecode();
> > =======
> >   othercode();
> >>>>>>>> bbbbbbb
> >
> > but aaaaaaa and bbbbbbb are not commits that they can find.
>
> Correct.  They are what they fed as two trees to be merged, aren't
> they?  They (or the script that drives merge-tree and fed these two
> trees) should be recognise these two trees, as long as they are told
> that is what we show, no?
>
> > That raises the question: if the user passes trees in, should we
> > require helpful names be provided as additional parameters?
>
> If the user wants to give human-readable name to override whatever
> the code would internally produce, such new options may help them,
> and should probably apply equally to input that happens to be a
> commit (or a tag that is a tree-ish) as well, I would think.
>
> > Or are
> > the usecases such that we don't expect callers to have any useful
> > information about where these trees come from and these suboptimal
> > conflicts are the best we can do?
>
> I do not necessarily think the output is "suboptimal" from the point
> of view of our users, exactly because that is what they fed into the
> command themselves.

Yeah, I was worried though that the end user wasn't the one running the git-merge-tree command, and was trying to dig more into usage cases. Johannes example of using revision:path specification lessens my worry, and you are right to point out that we can add additional options in the future to allow overriding with more human readable names.

Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 12 in “merge-tree: accept 3 trees as arguments”
  1. merge-tree: accept 3 trees as argumentsJohannes Schindelin via GitGitGadget, Jan 26, 2024
  2. Eric SunshineJan 26, 2024
  3. Junio C HamanoJan 26, 2024
  4. Johannes SchindelinJan 30, 2024
  5. merge-tree: accept 3 trees as argumentsJohannes Schindelin via GitGitGadget, Jan 28, 2024
  6. Junio C HamanoJan 29, 2024
  7. Elijah NewrenJan 30, 2024
  8. Junio C HamanoJan 30, 2024
  9. Elijah NewrenJan 31, 2024
  10. Junio C HamanoJan 31, 2024
  11. Johannes SchindelinJan 30, 2024
  12. Elijah NewrenJan 31, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.