diff options
author | Elijah Newren <newren@gmail.com> | 2021-03-13 22:22:06 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-18 14:32:56 -0700 |
commit | bf238b71377e924066ca5155a787c167177f706c (patch) | |
tree | edecc467c8b8d4a34b43d029ef2645d0cf51012a /merge-ort.c | |
parent | diffcore-rename: check if we have enough renames for directories early on (diff) | |
download | tgif-bf238b71377e924066ca5155a787c167177f706c.tar.xz |
diffcore-rename: add computation of number of unknown renames
The previous commit can only be effective if we have a computation of
the number of paths under a given directory which are still have pending
renames, and expected this number to be recorded in the dir_rename_count
map under the key UNKNOWN_DIR. Add the code necessary to compute these
values.
Note that this change means dir_rename_count might have a directory
whose only entry (for UNKNOWN_DIR) was removed by the time merge-ort
goes to check it. To account for this, merge-ort needs to check for the
case where the max count is 0.
With this change we are now computing the necessary value for each
directory in dirs_removed, but are not using that value anywhere. The
next two commits will make use of the values stored in dirs_removed in
order to compute whether each relevant_source (that is needed only for
directory rename detection) has become unnecessary.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-ort.c')
-rw-r--r-- | merge-ort.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/merge-ort.c b/merge-ort.c index e2606c73ad..f2b259986e 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -1546,6 +1546,9 @@ static void get_provisional_directory_renames(struct merge_options *opt, } } + if (max == 0) + continue; + if (bad_max == max) { path_msg(opt, source_dir, 0, _("CONFLICT (directory rename split): " |