Thread (1 message) 1 message, 1 author, 2026-02-23

Re: [PATCH v2 11/13] color: add color_parse_gently()

From: Junio C Hamano <hidden>
Date: 2026-02-23 05:03:05

Derrick Stolee [off-list ref] writes:
quoted
Do you mean that this error() call is not die(), the flag does not
fit the usual "gently" criteria?  In other words, should we make
this call die() if we call it "gently"?
This is an interesting case where the existing color parsing logic is
not following the typical pattern that uses die() on a failed parse.
I see.  I personally would view that an existing bug worth fixing,
but I ...
If we want to change the behavior to die() later, then that could be
considered, though I don't want to consider the ramifications right now.
... agree with you that it should be fixed outside the scope of this
topic.
I think the easiest "local" fix is to use the 'quiet' way, though it adds
some asymmetry in the config code in how it uses the 'gently' parameter.
Or, just add comments to the function that takes gently but does not
die() to warn those who would add new callers.  They can pass
gently=1 if they want to handle the errors themselves and keep it
that way.  If they want the function to die, well they have to wait
until the function is fixed to behave like everybody else.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help