From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Taylor Blau <me@ttaylorr.com>, git@vger.kernel.org, peff@peff.net
Subject: Re: [PATCH v2] ref-filter.c: pass empty-string as NULL to atom parsers
Date: Wed, 4 Oct 2017 19:11:48 -0700 [thread overview]
Message-ID: <20171005021148.GU19555@aiede.mtv.corp.google.com> (raw)
In-Reply-To: <xmqq376y9xf7.fsf@gitster.mtv.corp.google.com>
Junio C Hamano wrote:
> From: Taylor Blau <me@ttaylorr.com>
> Date: Mon, 2 Oct 2017 09:10:34 -0700
> Subject: [PATCH] ref-filter.c: pass empty-string as NULL to atom parsers
>
> Peff points out that different atom parsers handle the empty
> "sub-argument" list differently. An example of this is the format
> "%(refname:)".
>
> Since callers often use `string_list_split` (which splits the empty
> string with any delimiter as a 1-ary string_list containing the empty
> string), this makes handling empty sub-argument strings non-ergonomic.
>
> Let's fix this by declaring that atom parser implementations must
> not care about distinguishing between the empty string "%(refname:)"
> and no sub-arguments "%(refname)". Current code aborts, either with
> "unrecognised arg" (e.g. "refname:") or "does not take args"
> (e.g. "body:") as an error message.
>
> Signed-off-by: Taylor Blau <me@ttaylorr.com>
> Reviewed-by: Jeff King <peff@peff.net>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> ref-filter.c | 10 +++++++++-
> t/t6300-for-each-ref.sh | 1 +
> 2 files changed, 10 insertions(+), 1 deletion(-)
Thanks for taking care of it. This is indeed still
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
prev parent reply other threads:[~2017-10-05 2:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 5:50 [PATCH 0/1] ref-filter.c: pass empty-string as NULL to atom parsers Taylor Blau
2017-10-02 5:53 ` [PATCH] " Taylor Blau
2017-10-02 6:43 ` Jeff King
2017-10-02 16:12 ` Taylor Blau
2017-10-02 19:42 ` Jeff King
2017-10-02 16:10 ` [PATCH v2] " Taylor Blau
2017-10-02 19:42 ` Jeff King
2017-10-02 22:40 ` Jonathan Nieder
2017-10-02 23:55 ` Junio C Hamano
2017-10-03 3:37 ` Taylor Blau
2017-10-05 1:49 ` Junio C Hamano
2017-10-05 2:11 ` Jonathan Nieder [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=20171005021148.GU19555@aiede.mtv.corp.google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.