merge-ort: avoid recursing into identical trees
authorElijah Newren <redacted>
Sun, 13 Dec 2020 08:04:17 +0000 (08:04 +0000)
committerJunio C Hamano <redacted>
Sun, 13 Dec 2020 22:18:20 +0000 (14:18 -0800)
commit291f29caf6b045576f9953f0ea41fc8367966750
tree4c5fdd208705d855195f8b45c399967dd330a25d
parent98bf98416726430b6cbc8670725f008588e478a7
merge-ort: avoid recursing into identical trees

When all three trees have the same oid, there is no need to recurse into
these trees to find that all files within them happen to match.  We can
just record any one of the trees as the resolution of merging that
particular path.

Immediately resolving trees for other types of trivial tree merges (such
as one side matches the merge base, or the two sides match each other)
would prevent us from detecting renames for some paths, and thus prevent
us from doing three-way content merges for those paths whose renames we
did not detect.

Signed-off-by: Elijah Newren <redacted>
Signed-off-by: Junio C Hamano <redacted>
merge-ort.c
git clone https://git.99rst.org/PROJECT