Re: [PATCH 3/7] t4026: test "normal" color
- From
Jeff King <peff@peff.net>
- Date
- Nov 20, 2014, 19:00 UTC
- Message-ID
- <20141120190048.GA3741@peff.net>
- In-Reply-To
- <xmqqwq6p3dq3.fsf@gitster.dls.corp.google.com>
On Thu, Nov 20, 2014 at 10:53:56AM -0800, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes: > > > If the user specifiers "normal" for a foreground color, this
Argh, s/specifiers/specifies/
Show 6 quoted lines
> > We also check that color "-1" does the same thing. This is > > not documented, but has worked forever, so let's make sure > > we keep supporting it. > > YLNTED, really? I do not object to the conclusion, but I am > mildly surprised ;-)
I was surprised by it, too, when writing the refactoring patch that comes next in the series. :)
I was also surprised that we further check that "-2" is _not_ valid in the tests. I do not mind declaring everything negative to be the same (either invalid, or "normal"), but I decided that there was really no benefit to breaking compatibility in this case. And I suppose if you are using 256-color mode, then "-1 255" is perhaps a natural way to write it.
-Peff