Thread (32 messages) flat view 32 messages, 3 authors, 2016-06-15

Re: [PATCH v4 06/12] ref-filter: introduce color_atom_parser()

From: Eric Sunshine <hidden>
Date: 2016-06-15 23:08:08

On Sat, Feb 6, 2016 at 10:51 AM, Christian Couder
[off-list ref] wrote:
On Sat, Feb 6, 2016 at 4:20 PM, Karthik Nayak [off-list ref] wrote:
quoted
Also the error is reported already in color_parse(...), so seems duplicated.

git for-each-ref  --format="%(color:sfadf)%(align:middle,30)%(refname)%(end)"
error: invalid color value: sfadf
fatal: invalid color value: sfadf

What would be an ideal way around this?
Maybe it has already been discussed a lot and I missed the discussion,
but if possible the argument, the parameter or the atom itself might
just be ignored with a warning instead of dying when an atom argument,
format or parameter is not recognized, because in the next Git
versions we might want to add new arguments, formats and parameter and
it would be sad if old versions of Git die when those new things are
passed to them.
The current behavior of die()ing is inherited from existing code which
Karthik refactored to create ref-filter.c, so it is not a new issue,
and old versions of Git are already afflicted. Whether die()ing is
desirable or not is unrelated to the current series which is primarily
aimed at optimizing and slightly generalizing ref-filter.c.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help