From: Junio C Hamano <gitster@pobox.com>
To: "Md Isfarul Haque via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Md Isfarul Haque <isfarul.876@gmail.com>
Subject: Re: [PATCH 2/2] FIX memory leak in one branch
Date: Wed, 24 Jan 2024 12:11:11 -0800 [thread overview]
Message-ID: <xmqqil3icx0g.fsf@gitster.g> (raw)
In-Reply-To: <a7c81f7e114fc8854436e2ca1fccb4c968653317.1706105064.git.gitgitgadget@gmail.com> (Md Isfarul Haque via GitGitGadget's message of "Wed, 24 Jan 2024 14:04:24 +0000")
"Md Isfarul Haque via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Md Isfarul Haque <isfarul.876@gmail.com>
>
> Signed-off-by: Md Isfarul Haque <isfarul.876@gmail.com>
> ---
> diff.c | 1 +
> 1 file changed, 1 insertion(+)
We do not need to see that you are just as human as other developers
and are prone to make mistakes that you need to fix it in a
follow-up. In other words, please do not introduce a bug in [1/2]
only to be fixed in [2/2]. By squashing these two patches into one,
you can pretend as if you are a perfect developer and never leaked
memory ;-).
> diff --git a/diff.c b/diff.c
> index e3223b8ce5b..9fa00103a6b 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -2309,6 +2309,7 @@ const struct strbuf *diff_line_prefix_buf(struct diff_options *opt)
> msgbuf->alloc = 1;
> }
> else {
> + free(msgbuf);
> msgbuf = opt->output_prefix(opt, opt->output_prefix_data);
> }
> return msgbuf;
But as I said, I do not see a need for this helper function in the
first place, so...
next prev parent reply other threads:[~2024-01-24 20:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 14:04 [PATCH 0/2] [GSoC][RFC/Patch] FIX: use utf8_strnwidth for line_prefix in diff.c Md Isfarul Haque via GitGitGadget
2024-01-24 14:04 ` [PATCH 1/2] " Md Isfarul Haque via GitGitGadget
2024-01-24 20:01 ` Christian Couder
2024-01-25 5:42 ` Md Isfarul Haque
2024-01-24 20:08 ` Junio C Hamano
2024-01-25 5:52 ` Md Isfarul Haque
2024-01-24 14:04 ` [PATCH 2/2] FIX memory leak in one branch Md Isfarul Haque via GitGitGadget
2024-01-24 20:11 ` Junio C Hamano [this message]
2024-01-24 17:42 ` [PATCH 0/2] [GSoC][RFC/Patch] FIX: use utf8_strnwidth for line_prefix in diff.c Junio C Hamano
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=xmqqil3icx0g.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=isfarul.876@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).