revisions API: have release_revisions() release "commits"

Extend the the release_revisions() function so that it frees the
"commits" in the "struct rev_info".

We don't expect to use this "struct rev_info" again, so there's no
reason to NULL out revs->commits, as e.g. simplify_merges() and
create_boundary_commit_list() do.

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:45 +02:00 коммит произвёл Junio C Hamano
Родитель f0cb6b8053
Коммит e966fc5a89
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -2928,6 +2928,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
void release_revisions(struct rev_info *revs)
{
free_commit_list(revs->commits);
object_array_clear(&revs->pending);
}