Thread (117 messages) flat view 117 messages, 3 authors, 2022-03-04

Re: [PATCH 4/8] grep.c: move "prefix" out of "struct grep_opt"

From: Taylor Blau <hidden>
Date: 2021-11-10 00:19:02

On Tue, Nov 09, 2021 at 03:10:31AM +0100, Ævar Arnfjörð Bjarmason wrote:
quoted
All of that is to say that I share your motivation for this patch and
think that the direction is good, but I would have preferred to do it
without the caller_priv variable (unless there is something that I am
missing here).
Yes, that would make much more sense. I just had tunnel vision while
writing this, evidently. Yeah, just either passing it or using a static
variable in grep.c would make more sense.

Arguably we could even have it be read only (const char *const) and have
a global "the_prefix" or something, but it's probably not widely used
enough for that to make sense.
Either of the first two seem fine to me, but introducing `the_prefix`
seems both over-specified, and too big a step for this series alone.

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help