]> git.ipfire.org Git - thirdparty/git.git/commit - merge-ort.c
merge-ort: barebones API of new merge strategy with empty implementation
authorElijah Newren <newren@gmail.com>
Tue, 27 Oct 2020 02:08:07 +0000 (02:08 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Oct 2020 05:36:10 +0000 (22:36 -0700)
commit17e5574b0446836af08136ae269b30767c05b1d7
tree808c721a98bad7891f1c82153a4a2875f121bbf3
parent2e673356aefa8ed19be3c878f966ad6189ecb510
merge-ort: barebones API of new merge strategy with empty implementation

This is the beginning of a new merge strategy.  While there are some API
differences, and the implementation has some differences in behavior, it
is essentially meant as an eventual drop-in replacement for
merge-recursive.c.  However, it is being built to exist side-by-side
with merge-recursive so that we have plenty of time to find out how
those differences pan out in the real world while people can still fall
back to merge-recursive.  (Also, I intend to avoid modifying
merge-recursive during this process, to keep it stable.)

The primary difference noticable here is that the updating of the
working tree and index is not done simultaneously with the merge
algorithm, but is a separate post-processing step.  The new API is
designed so that one can do repeated merges (e.g. during a rebase or
cherry-pick) and only update the index and working tree one time at the
end instead of updating it with every intermediate result.  Also, one
can perform a merge between two branches, neither of which match the
index or the working tree, without clobbering the index or working tree.

The next three commits will demonstrate various uses of this new API.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
merge-ort.c [new file with mode: 0644]
merge-ort.h [new file with mode: 0644]