Re: [PATCH v2 04/18] cat-file: move struct expand_data into ref-filter
- From
Оля Тележная <olyatelezhnaya@gmail.com>
- Date
- Jan 16, 2018, 07:00 UTC
- Message-ID
- <CAL21Bmm0u4NgnPZMOh8PZqQ0is3inANKmCAr7MTaQHVyEOO7XQ@mail.gmail.com>
- In-Reply-To
- <20180115214419.GE4778@sigill.intra.peff.net>
2018-01-16 0:44 GMT+03:00 Jeff King <peff@peff.net>:
Show 15 quoted lines
> On Wed, Jan 10, 2018 at 09:36:41AM +0000, Olga Telezhnaya wrote: > >> Need that for further reusing of formatting logic in cat-file. >> Have plans to get rid of using expand_data in cat-file at all, >> and use it only in ref-filter for collecting, formatting and printing >> needed data. > > I think some of these will want to remain in cat-file.c. For instance, > split_on_whitespace is not something that ref-filter.c itself would care > about. I'd expect in the endgame for cat-file to keep its own > split_on_whitespace flag, and to set it based on the presence of the > %(rest) flag, which it can check by seeing if the "rest" atom is in the > "used_atom" list after parsing the format. > > -Peff
Yes, maybe we will need to leave some part of expand_data variables. But, if it would be only "split_on_whitespace", it's better to make just one flag without any other stuff. Actually, I thought about moving related logic to ref-filter also. Anyway, it's hard to say exact things before we code everything. Do I need to fix commit message and make it more soft?
Olga