Re: [RFC PATCH 1/3] usage: extract `prefix_suffix_lines()` from `advise()`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 30, 2018, 01:42 UTC
- Message-ID
- <xmqqfu29gbqp.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180529213957.GF7964@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> But most importantly, it means we could eventually colorize errors, too, > where we are not allowed to allocate. > > So perhaps: > > void report_lines(FILE *out, > const char *color, const char *color_reset, > const char *prefix, const char *msg); > > or something?
Sounds good to me. And if you hate the repeated "error:" prefix that makes the prefix on the second and subsequent lines included in cutting and pasting, we could use the two-prefix idea elsewhere in the thread, too.