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

Re: [PATCH 5/8] rerere: use ll_merge() instead of using xdl_merge()

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 17, 2010, 19:01 UTC
Message-ID
<7v4omk8sjg.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201001171252.38826.j6t@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 6 quoted lines
> On Sonntag, 17. Januar 2010, Junio C Hamano wrote:
>> This allows us to pay attention to the attribute settings and custom
>> merge driver the user sets up.
>
> I do not think that this change is necessary; I even think that it is wrong, 
> in particular, custom merge drivers should *not* be used anymore.

You are right in that nothing is strictly necessary as long as there are other ways to do so. This does not have to be how the issue is solved, but I found this to be one and the most natural way to allow rerere to pay attention to per-path conflict marker length attribute.

Contents that you would want to use custom merge drivers would not benefit from the current rerere that uses the default textual merge. In your customized XML merge editor example, the merged contents have irrelevant line breaks on either side of the merge that break textual merge (and that is the reason you are using a custom XML aware merge script to begin with).

So I didn't think using ll_merge() makes things worse, and that was the reason why I did it this way.

But I admit I didn't think things through (and that is why your name was on the Cc: line). If you really want to forbid custom merge drivers, I think we can add an option to ll_merge() to specify which attribute to ignore, and force the default textual merge in the codepath, or we can go back to the xdl_merge() but pass a custom conflict marker length in xmparam_t, as a follow-up fix.

Previous: Johannes SixtNext: Johannes Sixt
Message 8 of 13 in “Rescuing repeated merge of Documentation/git-merge.txt”
  1. 0/8 Rescuing repeated merge of Documentation/git-merge.txtJunio C Hamano, Jan 17, 2010
  2. 1/8 git_attr(): fix function signatureJunio C Hamano, Jan 17, 2010
  3. 2/8 xdl_merge(): introduce xmparam_t for merge specific parametersJunio C Hamano, Jan 17, 2010
  4. 3/8 xdl_merge(): allow passing down marker_size in xmparam_tJunio C Hamano, Jan 17, 2010
  5. 4/8 merge-tree: use ll_merge() not xdl_merge()Junio C Hamano, Jan 17, 2010
  6. 5/8 rerere: use ll_merge() instead of using xdl_merge()Junio C Hamano, Jan 17, 2010
  7. Johannes SixtJan 17, 2010
  8. Junio C HamanoJan 17, 2010
  9. Johannes SixtJan 17, 2010
  10. 6/8 conflict-marker-size: new attributeJunio C Hamano, Jan 17, 2010
  11. 7/8 rerere: prepare for customizable conflict marker lengthJunio C Hamano, Jan 17, 2010
  12. 8/8 rerere: honor conflict-marker-size attributeJunio C Hamano, Jan 17, 2010
  13. Junio C HamanoJan 17, 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.