merge-ort: avoid repeating fill_tree_descriptor() on the same tree
authorElijah Newren <newren@gmail.com>
Sun, 13 Dec 2020 08:04:14 +0000 (08:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Dec 2020 22:18:20 +0000 (14:18 -0800)
commit885f0063e9962068d381ca5256ca49070bb2480c
tree35056ec899a130d8d8bc796ffa432f185273ba53
parentd2bc1994f363ac2049da0cdd0b8a7bed61eeaab0
merge-ort: avoid repeating fill_tree_descriptor() on the same tree

Three-way merges, by their nature, are going to often have two or more
trees match at a given subdirectory.  We can avoid calling
fill_tree_descriptor() on the same tree by checking when these trees
match.  Noting when various oids match will also be useful in other
calculations and optimizations as well.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-ort.c