revisions API users: add straightforward release_revisions()
Add a release_revisions() to various users of "struct rev_list" in those straightforward cases where we only need to add the release_revisions() call to the end of a block, and don't need to e.g. refactor anything to use a "goto cleanup" pattern. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
1878b5edc0
commit
2108fe4a19
@ -4167,11 +4167,13 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
|
||||
read_object_list_from_stdin();
|
||||
} else if (pfd.have_revs) {
|
||||
get_object_list(&pfd.revs, rp.nr, rp.v);
|
||||
release_revisions(&pfd.revs);
|
||||
} else {
|
||||
struct rev_info revs;
|
||||
|
||||
repo_init_revisions(the_repository, &revs, NULL);
|
||||
get_object_list(&revs, rp.nr, rp.v);
|
||||
release_revisions(&revs);
|
||||
}
|
||||
cleanup_preferred_base();
|
||||
if (include_tag && nr_result)
|
||||
|
||||
Reference in New Issue
Block a user