From: Junio C Hamano <gitster@pobox.com>
To: Harald Dunkel <harri@afaics.de>
Cc: git@vger.kernel.org
Subject: Re: make "git --pager/--nopager" work as intended
Date: Thu, 22 Jan 2026 09:17:31 -0800 [thread overview]
Message-ID: <xmqqzf65o9ck.fsf@gitster.g> (raw)
In-Reply-To: <87o6mm2djm.fsf@tweety.afaics.de> (Harald Dunkel's message of "Thu, 22 Jan 2026 10:37:49 +0100")
Harald Dunkel <harri@afaics.de> writes:
> Hi folks,
>
> maybe its neurological, but the current behavior of "git -p" vs "git -P"
> makes me feel uneasy. Some commands (like git diff) use a pager by default,
> some ues it even without need (git branch), others don't. For every other
> git command I run I have the feeling git output is not working as intended.
>
> Setting core.pager to "cat" is not a solution. It breaks git -p.
>
> Regards
> Harri
I am not sure what is being asked here on the subject. As far as I
understand, "git -p cmd" and "git -P cmd" do work as intended in
that they override the default choice of use (or non-use) of pager,
built into each individual command.
If you are saying that you disagree with the built-in choice made by
some of the commands, perhaps the following snippet from "git help
config" may help?
pager.<cmd>::
If the value is boolean, turns on or off pagination of the
output of a particular Git subcommand when writing to a tty.
Otherwise, turns on pagination for the subcommand using the
pager specified by the value of `pager.<cmd>`. If `--paginate`
or `--no-pager` is specified on the command line, it takes
precedence over this option. To disable pagination for all
commands, set `core.pager` or `GIT_PAGER` to `cat`.
So, if you have too many local branches like I do (I seem to have
411 of them as of this writing),
[pager]
branch = false
would probably what you want? With it "git -p branch" would still
let me paginate through all 411 local branches, and "git branch" and
"git -P branch" would make them scroll away.
prev parent reply other threads:[~2026-01-22 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 9:37 make "git --pager/--nopager" work as intended Harald Dunkel
2026-01-22 17:17 ` 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=xmqqzf65o9ck.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=harri@afaics.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox