From f0cb6b8053eb9146e9d5255b6b0473d020c6e8bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 13 Apr 2022 22:01:44 +0200 Subject: revisions API users: use release_revisions() for "prune_data" users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- diff-lib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'diff-lib.c') diff --git a/diff-lib.c b/diff-lib.c index d6800274bd..0f16281253 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -642,6 +642,7 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt) if (diff_cache(&revs, tree_oid, NULL, 1)) exit(128); clear_pathspec(&revs.prune_data); + release_revisions(&revs); return 0; } -- cgit v1.2.3