diff options
author | Elijah Newren <newren@gmail.com> | 2021-02-27 00:30:47 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-26 17:53:12 -0800 |
commit | 333899e1e3f15010a85588e67a4ef0f664966c44 (patch) | |
tree | a754525c05b4f7ae8461923220070230c94b8c91 /xdiff/xprepare.h | |
parent | diffcore-rename: compute dir_rename_counts in stages (diff) | |
download | tgif-333899e1e3f15010a85588e67a4ef0f664966c44.tar.xz |
diffcore-rename: limit dir_rename_counts computation to relevant dirs
We are using dir_rename_counts to count the number of other directories
that files within a directory moved to. We only need this information
for directories that disappeared, though, so we can return early from
update_dir_rename_counts() for other paths.
If dirs_removed is passed to diffcore_rename_extended(), then it
provides the relevant bits of information for us to limit this counting
to relevant dirs. If dirs_removed is not passed, we would need to
compute some replacement in order to do this limiting. Introduce a new
info->relevant_source_dirs variable for this purpose, even though at
this stage we will only set it to dirs_removed for simplicity.
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff/xprepare.h')
0 files changed, 0 insertions, 0 deletions