git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/1] ref-filter.c: pass empty-string as NULL to atom parsers
@ 2017-10-02  5:50 Taylor Blau
  2017-10-02  5:53 ` [PATCH] " Taylor Blau
  2017-10-02 16:10 ` [PATCH v2] " Taylor Blau
  0 siblings, 2 replies; 12+ messages in thread
From: Taylor Blau @ 2017-10-02  5:50 UTC (permalink / raw)
  To: git; +Cc: gitster, peff, me

Hi,

Attached is a one-long patch series to un-distinguish between atoms
without sub-arguments ("%(refname)") and atoms with empty sub-argument
lists ("%(refname:)").

This addresses a user-experience issue that Peff points out:

> Doh, that string_list behavior is what I was missing in my earlier
> comments. I agree this is probably the best way of doing it. I'm tempted
> to say that parse_ref_filter_atom() should do a similar thing. Right now
> we've got:
>
>   $ git for-each-ref --format='%(refname)' | wc
>      2206    2206   79929
>   $ git for-each-ref --format='%(refname:short)' | wc
>      2206    2206   53622
>   $ git for-each-ref --format='%(refname:)' | wc
>   fatal: unrecognized %(refname:) argument:
>       0       0       0

By treating %(refname) and %(refname:) as the same thing. Peff has
convinced me that these _are_ indeed the same thing, as the first is a
%(refname) atom without any sub-arguments, and the later is a %(refname)
%atom with empty sub-arguments.

The reasoning is highlighted in the comment this patch adds, which makes
more ergonomic the use of string_list_split in atom parser
implementations.

Thank you in advance :-).


--
- Taylor

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-10-05  2:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).