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