merge-ort: add helper functions for using cached renames
authorElijah Newren <newren@gmail.com>
Thu, 20 May 2021 06:09:39 +0000 (06:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 May 2021 06:40:39 +0000 (15:40 +0900)
commit86b41b389546e68164ed58f6e60297a391cdca83
tree0c87a86036dfb20727d1c0496f66cd42a4727411
parentd509802993e8423d459a05fcd6151ca1782caa07
merge-ort: add helper functions for using cached renames

If we have a usable rename cache, then we can remove from
relevant_sources all the paths that were cached;
diffcore_rename_extended() can then consider an even smaller set of
relevant_sources in its rename detection.

However, when diffcore_rename_extended() is done, we will need to take
the renames it detected and then add back in all the ones we had cached
from before.

Add helper functions for doing these two operations; the next commit
will make use of them.

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