diffcore-rename: add function for clearing dir_rename_count
As we adjust the usage of dir_rename_count we want to have a function for clearing, or partially clearing it out. Add a partial_clear_dir_rename_count() function for this purpose. Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0c4fd732f0
commit
cd52e0050f
@ -528,6 +528,18 @@ static void initialize_dir_rename_info(struct dir_rename_info *info)
|
||||
}
|
||||
}
|
||||
|
||||
void partial_clear_dir_rename_count(struct strmap *dir_rename_count)
|
||||
{
|
||||
struct hashmap_iter iter;
|
||||
struct strmap_entry *entry;
|
||||
|
||||
strmap_for_each_entry(dir_rename_count, &iter, entry) {
|
||||
struct strintmap *counts = entry->value;
|
||||
strintmap_clear(counts);
|
||||
}
|
||||
strmap_partial_clear(dir_rename_count, 1);
|
||||
}
|
||||
|
||||
static void cleanup_dir_rename_info(struct dir_rename_info *info)
|
||||
{
|
||||
if (!info->setup)
|
||||
|
||||
Reference in New Issue
Block a user