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
2
bisect.c
2
bisect.c
@@ -884,6 +884,7 @@ static int check_ancestors(struct repository *r, int rev_nr,
|
||||
/* Clean up objects used, as they will be reused. */
|
||||
clear_commit_marks_many(rev_nr, rev, ALL_REV_FLAGS);
|
||||
|
||||
release_revisions(&revs);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -964,6 +965,7 @@ static void show_diff_tree(struct repository *r,
|
||||
|
||||
setup_revisions(ARRAY_SIZE(argv) - 1, argv, &opt, NULL);
|
||||
log_tree_commit(&opt, commit);
|
||||
release_revisions(&opt);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user