git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH RFC] show-branch: use pager

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 13, 2013, 17:33 UTC
Message-ID
<7vobb9vrt7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1371105811-3112-1-git-send-email-oystwa@gmail.com>
Øystein Walle <oystwa@gmail.com> writes:
Show 11 quoted lines
> This is for consistency with other porcelain commands such as 'log'.
>
> Signed-off-by: Øystein Walle <oystwa@gmail.com>
> ---
> The rationale for this patch I hope is consicely explained in the commit
> message. I was rather surprised it didn't use a pager as I've gotten used to it
> for most commands.
>
> I marked this as an RFC because of Jeff King's comments in
> daa0c3d97 where I got the impression this this might not be a good idea.
> However I haven't found any bugs and all the tests pass.

The tests are run largely without tty to allow them to run unattended, aren't they?

I think it makes a lot of sense to use pager by default for the normal show-branch output. I however do not think pager should apply to other modes (e.g. --independent, --merge-base).

But the use of these other modes are meant to be on the upstream side of a pipe or to be written out to a file, so a blanket call to setup_pager() before you even discover what mode we are in would not hurt in practice.

Previous: Matthieu Moy
Message 5 of 5 in “show-branch: use pager”
  1. show-branch: use pagerØystein Walle, Jun 13, 2013
  2. Jeff KingJun 13, 2013
  3. show-branch: use pagerØystein Walle, Jun 13, 2013
  4. Matthieu MoyJun 13, 2013
  5. Junio C HamanoJun 13, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.