Re: [PATCH] color.h: document and modernize header
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 13, 2018, 03:55 UTC
- Message-ID
- <CAPig+cSQecUr5+QkSWNHbzUeViTA7KjLdcjLZmfhK5hT-fuKfA@mail.gmail.com>
- In-Reply-To
- <20180213014130.190374-1-sbeller@google.com>
On Mon, Feb 12, 2018 at 8:41 PM, Stefan Beller <sbeller@google.com> wrote:
Show 15 quoted lines
> Add documentation explaining the functions in color.h. > While at it, migrate the function `color_set` into grep.c, > where the only callers are. > > Signed-off-by: Stefan Beller <sbeller@google.com> > --- > diff --git a/color.h b/color.h > @@ -76,22 +76,46 @@ int git_color_config(const char *var, const char *value, void *cb); > +/* > + * Output the formatted string in the specified color (and then reset to normal > + * color so subsequent output is uncolored). Omits the color encapsulation if > + * `color` is NULL. The `color_fprintf_ln` prints a new line after resetting > + * the color. BUG: The `color_print_strbuf` prints the given pre-formatted > + * strbuf instead, up to its first NUL character. > + */
"`color_print_strbuf` prints the given pre-formatted strbuf (BUG: but only up to the first NUL character)."
Probably not worth a re-roll is Junio can amend it locally.