Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
	Chris Torek <chris.torek@gmail.com>
Subject: Re: tb/ban-strtok
Date: Tue, 18 Apr 2023 15:31:21 -0400	[thread overview]
Message-ID: <ZD7wCYDmhiKcfhow@nand.local> (raw)
In-Reply-To: <xmqqo7nldt5f.fsf@gitster.g>

On Tue, Apr 18, 2023 at 09:58:20AM -0700, Junio C Hamano wrote:
> Taylor Blau <me@ttaylorr.com> writes:
>
> >>  Mark strtok() and strtok_r() to be banned.
> >>
> >>  source: <cover.1681428696.git.me@ttaylorr.com>
> >
> > This one needs a reroll to remove `strtok_r()` from the proposed banned
> > list, and to support slightly different semantics the new
> > string_list_split_in_place_multi() function. Will send today.
>
> I actually do not think we would seriously miss strtok_r(); as long
> as the rationale for doing so is clearly described, I think we are
> OK.  Just do not sell string-list as if it were the solution to
> everything (which is not---it is a rather poor data structure), but
> compare string_list_split() with strtok_r() and say our application
> hasn't needed the flexibility of the latter.

I agree that we wouldn't miss it at all, since we have no uses of
strtok_r() today.

But let's decide on banning it separately, since the much more
immediate-term issues are the existing uses of strtok() that are in the
tree.

Thanks,
Taylor

  reply	other threads:[~2023-04-18 19:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18  8:12 What's cooking in git.git (Apr 2023, #05; Mon, 17) Junio C Hamano
2023-04-18 14:53 ` tb/pack-revindex-on-disk (was: Re: What's cooking in git.git (Apr 2023, #05; Mon, 17)) Taylor Blau
2023-04-18 14:54 ` tb/enable-cruft-packs-by-default " Taylor Blau
2023-04-18 14:56 ` tb/ban-strtok " Taylor Blau
2023-04-18 16:58   ` tb/ban-strtok Junio C Hamano
2023-04-18 19:31     ` Taylor Blau [this message]
2023-04-19  2:51 ` en/header-split-cache-h (Was Re: What's cooking in git.git (Apr 2023, #05; Mon, 17)) Elijah Newren
2023-04-19 20:24 ` rj/branch-unborn-in-other-worktrees (was " Rubén Justo
  -- strict thread matches above, loose matches on Subject: below --
2023-04-20 22:34 What's cooking in git.git (Apr 2023, #06; Thu, 20) Junio C Hamano
2023-04-21  2:16 ` tb/ban-strtok (was: Re: What's cooking in git.git (Apr 2023, #06; Thu, 20)) Taylor Blau
2023-04-22 11:22   ` Jeff King
2023-04-24 16:39     ` tb/ban-strtok 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=ZD7wCYDmhiKcfhow@nand.local \
    --to=me@ttaylorr.com \
    --cc=chris.torek@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).