All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Avishay Matayev <me@avishay.dev>,
	phillip.wood@dunelm.org.uk, git@vger.kernel.org
Subject: Re: Forcing git to use a pager without a tty
Date: Mon, 28 Jun 2021 23:09:21 -0700	[thread overview]
Message-ID: <xmqqlf6tyzfy.fsf@gitster.g> (raw)
In-Reply-To: 87pmwazygf.fsf@evledraar.gmail.com

Ævar Arnfjörð Bjarmason <avarab@gmail.com> 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.

      parent reply	other threads:[~2021-06-29  6:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 22:40 Avishay Matayev
2021-06-23  1:56 ` Felipe Contreras
2021-06-23  8:25   ` Forcing git to use a pager without a tty Avishay Matayev
2021-06-25 17:42     ` Felipe Contreras
2021-06-26 10:28       ` Avishay Matayev
2021-06-23  8:12 ` Why empty subject? (was Re: ) Bagas Sanjaya
2021-06-23  8:21   ` Avishay Matayev
2021-06-23  9:05 ` Forcing git to use a pager without a tty Phillip Wood
2021-06-23  9:29   ` Phillip Wood
2021-06-24 20:25     ` Avishay Matayev
2021-06-24 22:10       ` Ævar Arnfjörð Bjarmason
2021-06-26 10:26         ` Avishay Matayev
2021-06-29  6:09         ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqlf6tyzfy.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=me@avishay.dev \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.