From: "René Scharfe" <l.s.r@web•de>
To: Junio C Hamano <gitster@pobox•com>, Jeff King <peff@peff•net>
Cc: Git List <git@vger•kernel.org>
Subject: Re: [PATCH] wrapper: simplify xmkstemp()
Date: Sat, 22 Nov 2025 14:29:49 +0100 [thread overview]
Message-ID: <18a0a729-d77c-4f4d-9581-b102bd66816c@web.de> (raw)
In-Reply-To: <xmqqbjkwahu1.fsf@gitster.g>
On 11/20/25 3:39 PM, Junio C Hamano wrote:
> Jeff King <peff@peff•net> writes:
>
>>>> +#define mkstemp(template) git_mkstemp_mode((template), 0600)
>>
>> So this patch implements what I was thinking, though I probably would
>> have made it more explicit: add mkstemp() to the banned list (not
>> because it's evil but because it's unportable) and force callers to use
>> git_mkstemp_mode() explicitly.
>
> Because only a very small number (one?) of callers call mkstemp()
> in the current code, the above is probably a good thing to do.
True, banning mkstemp(3) instead of overriding it would simplify the
code by removing one layer of indirection, and the hassle of no longer
being able to use that standard function would be low.
René
next prev parent reply other threads:[~2025-11-22 13:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 19:42 [PATCH] wrapper: simplify xmkstemp() René Scharfe
2025-11-17 21:52 ` Junio C Hamano
2025-11-18 9:46 ` Jeff King
2025-11-18 22:29 ` René Scharfe
2025-11-18 23:08 ` Junio C Hamano
2025-11-20 8:23 ` Jeff King
2025-11-20 14:39 ` Junio C Hamano
2025-11-22 13:29 ` René Scharfe [this message]
2025-11-22 13:24 ` René Scharfe
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=18a0a729-d77c-4f4d-9581-b102bd66816c@web.de \
--to=l.s.r@web$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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