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

Re: using xdl_merge(), was Re: Resolving conflicts

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 6, 2006, 10:47 UTC
Message-ID
<Pine.LNX.4.63.0612061145220.28348@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vlkll72no.fsf@assigned-by-dhcp.cox.net>
Hi,
On Wed, 6 Dec 2006, Junio C Hamano wrote:
Show 14 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > Originally, I thought that building in git-merge-one-file, and enhancing 
> > it to recognize by the parameters if it should act as a merge replacement, 
> > would be the way to go. Should I do this, or rather add 
> > builtin-merge-file?
> 
> All in-tree users of git-merge-one-file is of this pattern:
> 
> 	git merge-index -o git-merge-one-file -a
> 
> so I was hoping we can capture this whole thing as a single
> command (merge-index would fork+exec a merge-one-file per
> unmerged path), instead of doing merge-one-file as a built-in.

Yes, this was also my thinking. But notice how git-merge-one-file does much more than just merge? So, you end up rewriting it in C anyway, if you want to make merge-index not fork unless "-o cmd" is passed.

Show 6 quoted lines
> In any case, the way your xdl-merge engine is done, it should be almost 
> trivial to write a pure 'RCS merge replacement' as a totally separate 
> program -- the bulk of the new code would be parsing parameters, opening 
> the three input files, populating mmfile structures and writing the 
> result out, and there would be almost no "smart" in that part of the 
> code you would want to share with the git-aware version.

Actually, I just did that. I will add some test cases (to reflect your option (3) in another thread), and submit.

Ciao, Dscho

Previous: Junio C HamanoNext: Johannes Schindelin
Message 30 of 32 in “Resolving conflicts”
  1. Wink SavilleDec 1, 2006
  2. Alan ChandlerDec 1, 2006
  3. Wink SavilleDec 1, 2006
  4. Alan ChandlerDec 1, 2006
  5. Linus TorvaldsDec 1, 2006
  6. Wink SavilleDec 1, 2006
  7. Linus TorvaldsDec 1, 2006
  8. Linus TorvaldsDec 1, 2006
  9. Alan ChandlerDec 1, 2006
  10. Wink SavilleDec 1, 2006
  11. Alan ChandlerDec 1, 2006
  12. Wink SavilleDec 2, 2006
  13. Linus TorvaldsDec 2, 2006
  14. Junio C HamanoDec 2, 2006
  15. using xdl_merge(), was Re: Resolving conflictsJohannes Schindelin, Dec 2, 2006
  16. Ramsay JonesDec 5, 2006
  17. Linus TorvaldsDec 5, 2006
  18. Junio C HamanoDec 5, 2006
  19. Johannes SchindelinDec 5, 2006
  20. Junio C HamanoDec 5, 2006
  21. xdl_merge(): fix and simplify conflict handlingJohannes Schindelin, Dec 5, 2006
  22. Junio C HamanoDec 5, 2006
  23. Johannes SchindelinDec 5, 2006
  24. Junio C HamanoDec 5, 2006
  25. Jakub NarebskiDec 5, 2006
  26. Johannes SchindelinDec 5, 2006
  27. Junio C HamanoDec 6, 2006
  28. Johannes SchindelinDec 6, 2006
  29. Junio C HamanoDec 6, 2006
  30. Johannes SchindelinDec 6, 2006
  31. Johannes SchindelinDec 5, 2006
  32. Linus TorvaldsDec 1, 2006

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.