From: Jeff King <peff@peff.net>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Zeger-Jan van de Weg <git@zjvandeweg.nl>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH v2 1/1] config: learn the --stdin option for instructions
Date: Tue, 28 Jan 2020 04:24:14 -0500 [thread overview]
Message-ID: <20200128092414.GB574544@coredump.intra.peff.net> (raw)
In-Reply-To: <CAPig+cS03oS9PhN_cusjpzoCzwNmgc5rXiVAmG3ceUCFw71PVg@mail.gmail.com>
On Mon, Jan 27, 2020 at 11:59:03AM -0500, Eric Sunshine wrote:
> Second, this doesn't give any indication about how the lines should be
> terminated. It should instead be written as:
>
> set SP <key> NUL <value> NUL
> unset SP <key> NUL
>
> Third, importantly, unlike git-update-ref from which this DSL takes
> inspiration and in which "refs" might have oddball names for which
> NUL-termination makes sense, it's hard to imagine a case in which a
> configuration key would be so strange as to warrant NUL-termination.
> This observation suggests a simpler DSL in which only <value> is
> NUL-terminated:
>
> set SP <key> SP <value> NUL
> unset SP <key> LF
>
> (The proposed code changes in config.c would need adjustment, as well,
> to implement this revised DSL.)
The section and key parts of a config key are pretty restricted, but the
subsection portion can contain anything except newline and NUL. So in
particular, it would be valid to have a space, which would make the
input ambiguous.
I agree it would probably be rare, but isn't the whole point of "-z" to
be able to represent anything without worrying about quoting?
-Peff
next prev parent reply other threads:[~2020-01-28 9:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 10:09 [PATCH v2 0/1] config: read instructions from stdin Zeger-Jan van de Weg
2020-01-27 10:09 ` [PATCH v2 1/1] config: learn the --stdin option for instructions Zeger-Jan van de Weg
2020-01-27 11:44 ` Christian Couder
2020-01-27 16:59 ` Eric Sunshine
2020-01-28 9:24 ` Jeff King [this message]
2020-01-28 13:42 ` Eric Sunshine
2020-01-28 19:28 ` Junio C Hamano
2020-01-29 2:37 ` Jeff King
2020-01-28 9:19 ` Jeff King
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=20200128092414.GB574544@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=git@zjvandeweg.nl \
--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 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).