summaryrefslogtreecommitdiff
path: root/builtin/add.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-04-13 20:01:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-04-14 06:56:09 (GMT)
commitf0cb6b8053eb9146e9d5255b6b0473d020c6e8bd (patch)
tree884ec63039b04bbcd23c88cc23385f74c47e743c /builtin/add.c
parentbf1b32d0991cfead7e5604897d0866b789bf602e (diff)
downloadgit-f0cb6b8053eb9146e9d5255b6b0473d020c6e8bd.zip
git-f0cb6b8053eb9146e9d5255b6b0473d020c6e8bd.tar.gz
git-f0cb6b8053eb9146e9d5255b6b0473d020c6e8bd.tar.bz2
revisions API users: use release_revisions() for "prune_data" users
Use release_revisions() for users of "struct rev_list" that reach into the "struct rev_info" and clear the "prune_data" already. In a subsequent commit we'll teach release_revisions() to clear this itself, but in the meantime let's invoke release_revisions() here to clear anything else we may have missed, and for reasons of having consistent boilerplate. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/add.c')
-rw-r--r--builtin/add.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/add.c b/builtin/add.c
index f507d21..115a26e 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -143,6 +143,7 @@ int add_files_to_cache(const char *prefix,
rev.max_count = 0; /* do not compare unmerged paths with stage #2 */
run_diff_files(&rev, DIFF_RACY_IS_MODIFIED);
clear_pathspec(&rev.prune_data);
+ release_revisions(&rev);
return !!data.add_errors;
}