merge-ort, diffcore-rename: tweak dirs_removed and relevant_source type
commita49b55d52e7dcfd628b6328c9098d734ebe7a97d
authorElijah Newren <newren@gmail.com>
Sat, 13 Mar 2021 22:22:02 +0000 (13 22:22 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Mar 2021 21:32:55 +0000 (18 14:32 -0700)
tree349fb56f1cf7700d6218e011c1627eb41f3e4b19
parentae1db7b31c54c95b1ecb2005f7a37e3645ec9eda
merge-ort, diffcore-rename: tweak dirs_removed and relevant_source type

As noted in the previous commit, we want to be able to take advantage of
the "majority rules" portion of directory rename detection to avoid
detecting more renames than necessary.  However, for diffcore-rename to
take advantage of that, it needs to know whether a rename source file
was needed for just directory rename detection reasons, or if it is
wanted for potential three-way content merging.  Modify relevant_sources
from a strset to a strintmap, so we can encode additional information.

We also modify dirs_removed from a strset to a strintmap at the same
time because trying to determine what files are needed for directory
rename detection will require us tracking a bit more information for
each directory.

This commit only changes the types of the two variables from strset to
strintmap; it does not actually store any special values yet and for now
only checks for presence of entries in the strintmap.  Thus, the code is
functionally identical to how it behaved before.  Future commits will
start associating values with each key for these two maps.

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