Re: [PATCH v3 1/6] bisect.c: add missing "goto" for release_revisions()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 3, 2022, 17:13 UTC
- Message-ID
- <xmqqedxxb683.fsf@gitster.g>
- In-Reply-To
- <patch-v3-1.6-12a4a20c59f-20220802T152925Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 22 quoted lines
> Add a missing "goto cleanup", this fixes a bug in
> f196c1e908d (revisions API users: use release_revisions() needing
> REV_INFO_INIT, 2022-04-13).
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
> bisect.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bisect.c b/bisect.c
> index b63669cc9d7..421470bfa59 100644
> --- a/bisect.c
> +++ b/bisect.c
> @@ -1054,7 +1054,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix)
> */
> res = error_if_skipped_commits(tried, NULL);
> if (res < 0)
> - return res;
> + goto cleanup;
> printf(_("%s was both %s and %s\n"),
> oid_to_hex(current_bad_oid),
> term_good,OK, from the cleanup: label we call release_revisions(&rev) which was used in the "failed" attempt to find bisection. Looks good.