]> git.ipfire.org Git - thirdparty/git.git/commit - Makefile
xdiff: add xdl_merge()
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Tue, 21 Nov 2006 22:24:34 +0000 (23:24 +0100)
committerJunio C Hamano <junkio@cox.net>
Sun, 3 Dec 2006 01:28:19 +0000 (17:28 -0800)
commit857b933e04bc21ce02043c3107c148f8dcbb4a01
treed1d442ef36ced24eb3f33719150018bad793ae15
parent278fcd7debf19c1efee18b32f8867becb18d1a22
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.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile
xdiff/xdiff.h
xdiff/xdiffi.c
xdiff/xdiffi.h
xdiff/xmerge.c [new file with mode: 0644]