Re: [PATCH RFC 06/20] cat-file: remove mark_query from expand_data
- From
Jeff King <peff@peff.net>
- Date
- Feb 28, 2019, 21:25 UTC
- Message-ID
- <20190228212540.GF12723@sigill.intra.peff.net>
- In-Reply-To
- <0102016915f49a4f-f02a6509-a3ba-41b0-b768-3d8ba116f526-000000@eu-west-1.amazonses.com>
On Fri, Feb 22, 2019 at 04:05:45PM +0000, Olga Telezhnaya wrote:
Show 6 quoted lines
> Get rid of mark_query field in struct expand_data. > expand_data may be global further as we use it in ref-filter also, > so we need to remove cat-file specific fields from it. > > All globals that I add through this patch will be deleted in the end, > so treat it just as the middle step.
So this is a similar situation to the split_on_whitespace thing we have in the previous patch.
I think many of my comments there could apply here. I.e., do we need to be removing them from expand_data now, instead of just moving the bits from expand_data over to ref-filter?
But if we assume for a moment that doing it that way isn't feasible (or at least isn't as easy as this way), then I think what this patch does is preferable to the previous one. By making it a global variable, we can still interact with it from the expand callback, even if it's not part of expand_data().
So the previous patch could make "split_on_whitespace" a global, and then continue to set it from expand_atom() as the current code does.
-Peff