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

Re: [PATCH 2/3] make union merge an xdl merge favor

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 1, 2010, 17:28 UTC
Message-ID
<7veik4t0i7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vaausza8v.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> I am mildly against "merge-file --union" in the first place.  The part I
> actually liked in [2/3] was the removal of postprocessing.

Actually I take the first sentence back. The --union option given to merge-file is comparable to --ours/--theirs that let you (a Porcelain writer using the command) access the ll-merge machinery to resolve conflicts in favor of one side on contents stored in an arbitrary temporary filename (or even outside a git repository). So as a feature I think addition of "union" is in line with what we already have.

But I at the same time I think that we could add the feature while making existing --ours/--theirs options redundant (and deprecatable if we want to in the longer term), if the attributes mechanism is made available to us (e.g. add "--attribute-path=<use attributes for this path>" option, and/or perhaps add "--attributes=<use this set of attributes>" option) directly from the command line.

I doubt "checkout --union" is a good idea, though. Its --ours/--theirs options do not have anything to do with merge (it specifies _what_ to checkout, not _how_), and the comparison I made in the previous paragraph for merge-file does not apply.

It however is plausible that in a scenario where:
 (1) you ran "git merge" (or anything that results in conflicts) and got a
     conflict; and
 (2) you know using other ll-merge backend, perhaps a custom one you have
     that is accessible via ll-merge, would have produced a better result.

it might be useful if you can say "forget this failed auto-merge; attempt the same merge for the path but using this different ll-merge backend". I don't think that feature belongs to "checkout", though.

Previous: Bert WesargNext: Bert Wesarg
Message 7 of 10 in “merge-file: add option to specify the marker size”
  1. 1/3 merge-file: add option to specify the marker sizeBert Wesarg, Feb 28, 2010
  2. 2/3 make union merge an xdl merge favorBert Wesarg, Feb 28, 2010
  3. Junio C HamanoFeb 28, 2010
  4. Bert WesargMar 1, 2010
  5. Junio C HamanoMar 1, 2010
  6. Bert WesargMar 1, 2010
  7. Junio C HamanoMar 1, 2010
  8. 3/3 refactor merge flags into xmparam_tBert Wesarg, Feb 28, 2010
  9. Junio C HamanoFeb 28, 2010
  10. Bert WesargMar 1, 2010

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.