Re: your mail
- From
- Davide Libenzi <davidel@xmailserver.org>
- Date
- Nov 22, 2006, 20:16 UTC
- Message-ID
- <Pine.LNX.4.64.0611221208430.27569@alien.or.mcafeemobile.com>
- In-Reply-To
- <Pine.LNX.4.63.0611212316080.26827@wbgn013.biozentrum.uni-wuerzburg.de>
On Tue, 21 Nov 2006, Johannes Schindelin wrote:
Show 20 quoted lines
> [PATCH] xdiff: add xdl_merge() > > This new function implements the functionality of RCS merge, but > in-memory. It returns < 0 on error, otherwise the number of conflicts. > > Finding the conflicting lines can be a very expensive task. You can > control the eagerness of this algorithm: > > - a level value of 0 means that all overlapping changes are treated > as conflicts, > - a value of 1 means that if the overlapping changes are identical, > it is not treated as a conflict. > - If you set level to 2, overlapping changes will be analyzed, so that > almost identical changes will not result in huge conflicts. Rather, > only the conflicting lines will be shown inside conflict markers. > > With each increasing level, the algorithm gets slower, but more accurate. > Note that the code for level 2 depends on the simple definition of > mmfile_t specific to git, and therefore it will be harder to port that > to LibXDiff.
Johannes, at the moment I'm chased by a huge storm of never ending emails, so I won't be able to follow up this one soon. A smart 3-way merge is in my plans for LibXDiff though. There is quite some nice code around, that does pretty smart tricks and goes down to resolve sub-hunk non-trivial conflicts. You may want to take a look at that code too.
- Davide