From: "René Scharfe" <l.s.r@web.de>
To: Patrick Steinhardt <ps@pks.im>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] difftool: add env vars directly in run_file_diff()
Date: Sat, 1 Jun 2024 22:23:39 +0200 [thread overview]
Message-ID: <f76eaa71-2b04-4d6c-a378-a40010aec22d@web.de> (raw)
In-Reply-To: <Zlbf1IY4jFlUPD7e@tanuki>
Am 29.05.24 um 09:57 schrieb Patrick Steinhardt:
> On Sun, May 26, 2024 at 10:16:50PM +0200, René Scharfe wrote:
>> Add the environment variables of the child process directly using
>> strvec_push() instead of building an array out of them and then adding
>> that using strvec_pushv(). The new code is shorter and avoids magic
>> array index values and fragile array padding.
>>
>> Signed-off-by: René Scharfe <l.s.r@web.de>
>
> I don't know whether this may cause more allocations.
It doesn't -- strvec_pushv() calls strvec_push() in a loop, the
patch just unrolls it.
René
prev parent reply other threads:[~2024-06-01 20:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-26 20:16 [PATCH] difftool: add env vars directly in run_file_diff() René Scharfe
2024-05-29 7:57 ` Patrick Steinhardt
2024-06-01 20:23 ` René Scharfe [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=f76eaa71-2b04-4d6c-a378-a40010aec22d@web.de \
--to=l.s.r@web.de \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/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).