From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] xdiff: add xdl_merge() (was: (unknown))
Date: Wed, 22 Nov 2006 00:15:09 +0100 [thread overview]
Message-ID: <ek0170$h53$1@sea.gmane.org> (raw)
In-Reply-To: Pine.LNX.4.63.0611212316080.26827@wbgn013.biozentrum.uni-wuerzburg.de
Johannes Schindelin wrote:
> [PATCH] xdiff: add xdl_merge()
Shouldn't this be in the subject of message?
> This new function implements the functionality of RCS merge, but
> in-memory. It returns < 0 on error, otherwise the number of conflicts.
Only RCS merge, or can you implement whole diff3 (from GNU diffutils)
functionality with that?
> 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.
How it compares performance with RCS merge/GNU diff3?
It is really nice to have that. Bram Cohen (of Codeville, SCM built around
sophisticated merge algorithm) wrote about recursive three-way merge in
http://revctrl.org/CrissCrossMerge
Recursive three-way merge _usually_ provides the right answer, however
there are some edge cases. For example, conflict markers can be matched
incorrectly, because they aren't given any special semantic meaning for
the merge algorithm, and are simply treated as lines. In particular,
there are (somewhat complicated) cases where the conflict markers of two
unrelated conflicts get matched against each other, even though the
content sections of them are totally unrelated.
I'm not sure if he has specific examples, or is it just theoretical talk,
but having built-in merge would certainly help revursive merge strategy
(and perhaps also git-rerere).
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2006-11-21 23:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-21 22:24 (unknown) Johannes Schindelin
2006-11-21 23:15 ` Jakub Narebski [this message]
2006-11-22 9:29 ` [PATCH] xdiff: add xdl_merge() (was: (unknown)) Johannes Schindelin
2006-11-22 19:58 ` [PATCH] xdiff: add xdl_merge() Ramsay Jones
2006-11-22 20:16 ` your mail Davide Libenzi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ek0170$h53$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).