diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-04-13 22:01:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-14 08:56:08 +0200 |
commit | 2108fe4a1976f95821e13503fd331f075da398c6 (patch) | |
tree | 9efbeb9ae5af4db1dc900ff36eabf41d451d3eb5 /builtin/checkout.c | |
parent | revision.[ch]: provide and start using a release_revisions() (diff) | |
download | git-2108fe4a1976f95821e13503fd331f075da398c6.tar.xz git-2108fe4a1976f95821e13503fd331f075da398c6.zip |
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>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r-- | builtin/checkout.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 4d9e0bd3ac..7ad4a7113c 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1082,6 +1082,7 @@ static void orphaned_commit_warning(struct commit *old_commit, struct commit *ne /* Clean up objects used, as they will be reused. */ repo_clear_commit_marks(the_repository, ALL_REV_FLAGS); + release_revisions(&revs); } static int switch_branches(const struct checkout_opts *opts, |