From: Jeff King Date: Mon, 02 Oct 2017 19:42:08 GMT Subject: Re: [PATCH v2] ref-filter.c: pass empty-string as NULL to atom parsers Message-ID: <20171002194208.sfjepr3vsidobb6b@sigill.intra.peff.net> In-Reply-To: <20171002161034.44867-1-me@ttaylorr.com> On Mon, Oct 02, 2017 at 09:10:34AM -0700, Taylor Blau wrote: > 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 assuming that atom parser implementations don't care > about distinguishing between the empty string "%(refname:)" and no > sub-arguments "%(refname)". > > Signed-off-by: Taylor Blau > --- > ref-filter.c | 10 +++++++++- > t/t6300-for-each-ref.sh | 1 + > 2 files changed, 10 insertions(+), 1 deletion(-) This looks good to me, thanks. -Peff