Re: [PATCH 4/8] grep.c: move "prefix" out of "struct grep_opt"
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Nov 10, 2021, 00:18 UTC
- Message-ID
- <YYsP8WM14RvgE7w9@nand.local>
- In-Reply-To
- <211109.865yt2dqmf.gmgdl@evledraar.gmail.com>
On Tue, Nov 09, 2021 at 03:10:31AM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 12 quoted lines
> > 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