Re: [RFC PATCH 6/8] pager: remove pager_in_use()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 28, 2023, 20:58 UTC
- Message-ID
- <xmqqfs6bcnic.fsf@gitster.g>
- In-Reply-To
- <kl6lv8f8qvhd.fsf@chooglen-macbookpro.roam.corp.google.com>
Glen Choo <chooglen@google.com> writes:
Show 10 quoted lines
> Having the function isn't just nice for typo prevention - it's also a > reasonable boundary around the pager subsystem. We could imagine a > world where we wanted to track the pager status using a static > var instead of an env var (not that we'd even want that :P), and this > inlining makes that harder. > > From the cover letter, it seems like we only need this to remove > "#include pager.h" from date.c, and that's only used in > parse_date_format(). Could we add a is_pager/pager_in_use to that > function and push the pager.h dependency upwards?
Thanks---I think that may show a good direction. parse_date_format() reacts to "auto:foo" and as long as that feature needs to be there, pager_in_use() must be available to the function.