]> git.ipfire.org Git - thirdparty/git.git/commit - diffcore-rename.c
diffcore-rename: check if we have enough renames for directories early on
authorElijah Newren <newren@gmail.com>
Sat, 13 Mar 2021 22:22:05 +0000 (22:22 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Mar 2021 21:32:56 +0000 (14:32 -0700)
commit0491d39297132c48e36c2f73cb0dfe7e22b3c52f
tree98edf98579bb9aabceb97481ab1b404efcf86210
parente54385b97a69e09ec12be5f8eef234777c801257
diffcore-rename: check if we have enough renames for directories early on

As noted in the past few commits, if we can determine that a directory
already has enough renames to determine how directory rename detection
will be decided for that directory, then we can mark that directory as
no longer needing any more renames detected for files underneath it.
For such directories, we change the value in the dirs_removed map from
RELEVANT_TO_SELF to RELEVANT_FOR_ANCESTOR.

A subsequent patch will use this information while iterating over the
remaining potential rename sources to mark ones that were only
location_relevant as unneeded if no containing directory is still marked
as RELEVANT_TO_SELF.

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