revisions API: have release_revisions() release "prune_data"

Extend the the release_revisions() function so that it frees the
"prune_data" in the "struct rev_info". This means that any code that
calls "release_revisions()" already can get rid of adjacent calls to
clear_pathspec().

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2022-04-13 22:01:50 +02:00
committed by Junio C Hamano
parent f41fb662f5
commit 689a8e80dd
6 changed files with 1 additions and 8 deletions

View File

@@ -568,8 +568,6 @@ static int get_modified_files(struct repository *r,
run_diff_files(&rev, 0);
}
if (ps)
clear_pathspec(&rev.prune_data);
release_revisions(&rev);
}
hashmap_clear_and_free(&s.file_map, struct pathname_entry, ent);