Re: [PATCH v3 1/3] color.c: refactor color_output arguments
- From
Jeff King <peff@peff.net>
- Date
- Feb 11, 2020, 19:46 UTC
- Message-ID
- <20200211194640.GA2127797@coredump.intra.peff.net>
- In-Reply-To
- <20200211193625.231492-2-gitster@pobox.com>
On Tue, Feb 11, 2020 at 11:36:23AM -0800, Junio C Hamano wrote:
Show 6 quoted lines
> +enum {
> + COLOR_BACKGROUND_OFFSET = 10,
> + COLOR_FOREGROUND_ANSI = 30,
> + COLOR_FOREGROUND_RGB = 38,
> + COLOR_FOREGROUND_256 = 38,
> +};I had to double-check to make sure the duplication in the last two wasn't a bug. It's correct, because "38" here is really "set the foreground color", and they're followed by more magic for "256" or "RGB".
So really this could be a single COLOR_FOREGROUND_EXTENDED or similar that gets used in both places. But I don't know that it really matters that much.
Other than that nitpick, the patches all looked OK to me. Thanks for tying up this loose end.
-Peff