merge-ort: handle interactions of caching and rename/rename(1to1) cases
authorElijah Newren <newren@gmail.com>
Thu, 20 May 2021 06:09:40 +0000 (06:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 May 2021 06:40:39 +0000 (15:40 +0900)
commitcbdca289fbb011e7397fecfebeeac3f887ef22d1
tree777fce16ad89262da8bb06ff6519b2adcf5a4995
parent86b41b389546e68164ed58f6e60297a391cdca83
merge-ort: handle interactions of caching and rename/rename(1to1) cases

As documented in Documentation/technical/remembering-renames.txt, and as
tested for in the two testcases in t6429 with "rename same file
identically" in their description, there is one case where we need to
have renames in one commit NOT be cached for the next commit in our
rebase sequence -- namely, rename/rename(1to1) cases.  Rather than
specifically trying to uncache those and fix up dir_rename_counts() to
match (which would also be valid but more work), we simply disable the
optimization when this really rare type of rename occurs.

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