From: Junio C Hamano <gitster@pobox.com>
To: "Rubén Justo" <rjusto@gmail.com>
Cc: Git List <git@vger.kernel.org>, Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v2] checkout: plug some leaks in git-restore
Date: Thu, 14 Mar 2024 11:57:39 -0700 [thread overview]
Message-ID: <xmqq8r2kvdy4.fsf@gitster.g> (raw)
In-Reply-To: <64c1c3cc-51d7-4168-9731-4389889e1449@gmail.com> ("Rubén Justo"'s message of "Thu, 14 Mar 2024 19:08:58 +0100")
Rubén Justo <rjusto@gmail.com> writes:
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index 4fe049cf37..2e8b0d18f4 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -1704,10 +1704,11 @@ static char cb_option = 'b';
>
> static int checkout_main(int argc, const char **argv, const char *prefix,
> struct checkout_opts *opts, struct option *options,
> - const char * const usagestr[],
> - struct branch_info *new_branch_info)
> + const char * const usagestr[])
> {
> int parseopt_flags = 0;
> + struct branch_info new_branch_info = { 0 };
> + int ret;
Ah, nice. This is one thing I missed.
The callers of checkout_main() do not even care about the
new_branch_info structure so there is no point having them allocate
and pass a pointer to one to call this function.
The remainder is just as expected. Will queue. Thanks.
prev parent reply other threads:[~2024-03-14 18:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 1:32 [PATCH] checkout: plug some leaks in git-restore Rubén Justo
2024-03-14 2:39 ` Eric Sunshine
2024-03-14 7:36 ` Rubén Justo
2024-03-14 16:45 ` Junio C Hamano
2024-03-14 18:08 ` [PATCH v2] " Rubén Justo
2024-03-14 18:57 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq8r2kvdy4.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=rjusto@gmail.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.