merge-ort: preserve cached renames for the appropriate side
authorElijah Newren <newren@gmail.com>
Thu, 20 May 2021 06:09:38 +0000 (06:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 May 2021 06:40:39 +0000 (15:40 +0900)
commitd509802993e8423d459a05fcd6151ca1782caa07
treecde77fddcc405bea7cd5fafe06f3e5da3abb6850
parent19ceb486f8dd25fb5782724c454edb2f06f1ed71
merge-ort: preserve cached renames for the appropriate side

Previous commits created an in-memory cache of the results of rename
detection, and added logic to detect when that cache could appropriately
be used in a subsequent merge operation -- but we were still
unconditionally clearing the cache with each new merge operation anyway.
If it is valid to reuse the cache from one of the two sides of history,
preserve that side.

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