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

Re: JGIT: discuss: diff/patch implementation

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 10, 2008, 23:37 UTC
Message-ID
<alpine.DEB.1.00.0811110031510.30769@pacific.mpi-cbg.de>
In-Reply-To
<7v63mv5mro.fsf@gitster.siamese.dyndns.org>
Hi,
On Mon, 10 Nov 2008, Junio C Hamano wrote:
Show 7 quoted lines
> Francis Galiegue <fg@one2team.net> writes:
> 
> > A very nice git feature, without even going as far as merges, is the 
> > cherry pick feature.
> 
> I thought cherry-picking needs to be done in terms of 3-way merge, not 
> diff piped to patch, for correctness's sake.

I haven't checked how RCS merge does it, but I know how xdiff/xmerge.c does it ;-)

Basically, it takes the two diffs relative to the base file and works on the overlapping hunks (i.e. on hunks where the ranges in the base file overlap).

So we need a diff algorithm very much if we were to imitate that code in JGit, which I very much plan to do.

Ciao, Dscho

Previous: Francis GaliegueNext: Raimund Bauer
Message 11 of 16 in “JGIT: discuss: diff/patch implementation”
  1. Francis GaliegueNov 10, 2008
  2. Robin RosenbergNov 10, 2008
  3. Francis GaliegueNov 10, 2008
  4. Robin RosenbergNov 10, 2008
  5. Francis GaliegueNov 10, 2008
  6. Johannes SchindelinNov 10, 2008
  7. Francis GaliegueNov 10, 2008
  8. Junio C HamanoNov 10, 2008
  9. Shawn O. PearceNov 10, 2008
  10. Francis GaliegueNov 10, 2008
  11. Johannes SchindelinNov 10, 2008
  12. Raimund BauerNov 11, 2008
  13. Shawn O. PearceNov 11, 2008
  14. Sverre RabbelierNov 11, 2008
  15. Rogan DawesNov 11, 2008
  16. Shawn O. PearceNov 11, 2008

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.