Subject: Re: Forcing git to use a pager without a tty

From: Junio C Hamano <[email-masked]>
Date: Mon, 28 Jun 2021 23:09:21 -0700

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> What do you do about things like "git status" etc. that produce a lot of
> output, but don't invoke the pager even then (but perhaps should), ditto
> for all the plumbing or plumbing-like such as "ls-files", "ls-tree" etc?

I am puzzled.  Doesn't "git -p status" force spawning the pager?

    ... goes and checks ...

Ahh, OK, -p does force us to try to see if pager is warranted, and
then we decide it is not because the output is not sent to the tty.

This behaviour makes sense if we are truly driving a pager via
GIT_PAGER, but I agree with you that it probably is inconvenient if
you are abusing the GIT_PAGER mechanism to drive something that is
not about paging output but about grabbing the output and
post-processing it.