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

Re: [PATCH] Document how to tell git to not launch a pager

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Jul 19, 2007, 14:38 UTC
Message-ID
<1F7F4219-8B2C-40A3-9F4D-BA79FAD7E2DB@silverinsanity.com>
In-Reply-To
<20070719110224.GA4293@piper.oerlikon.madduck.net>
On Jul 19, 2007, at 7:02 AM, martin f krafft wrote:
Show 13 quoted lines
> +1 on the patch, but I also wonder why use of a pager is default in
> git anyway. At least I find it to be contrary to what I am used to
> on the Unix command line.
>
> For reference, there was an argument about this in
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=424978, which
> includes a long IRC log in German, unfortunately, where a bunch of
> people agreed with my proposal *not* to use a pager by default,
> since it makes it difficult to use information from the output to
> assemble the next command on the command line. Every terminal in use
> nowadays can easily scroll and even search back 250 lines with the
> added benefit of not randomly clearing the screen when you quit
> $PAGER.

I think it's because much of the core git community lives more on the console or simple terminals like xterm than in something with easy search and scrolling features like konsole or Terminal.app. Git output tends to become very long very quickly, and usually you want to start reading from the beginning.

Many command line tools either output small chunks of input (ls, in most directories), output slowly (make), or their input is mostly only important when it errors out (make). Git's output tends to be quite long and have the most relevant (read: recent) information at the beginning so paging is pretty much a must, instead of an occasional need.

If someone thinks that git paging by default is obnoxious, it just takes running "git config --global core.pager cat". Now, no more paging. If you find your $PAGER clearing the screen when quitting obnoxious, I suggest checking your configuration. In particular, I find setting $LESS to "FX" (at least) to be most useful.

~~ Brian
Previous: martin f krafft
Message 12 of 12 in “Document how to tell git to not launch a pager”
  1. Document how to tell git to not launch a pagerSteven Grimm, Jul 19, 2007
  2. martin f krafftJul 19, 2007
  3. Johannes SchindelinJul 19, 2007
  4. Julian PhillipsJul 19, 2007
  5. David KastrupJul 19, 2007
  6. Linus TorvaldsJul 19, 2007
  7. Nikolai WeibullJul 19, 2007
  8. Linus TorvaldsJul 19, 2007
  9. Matthieu MoyJul 19, 2007
  10. Thomas GlanzmannJul 19, 2007
  11. martin f krafftJul 19, 2007
  12. Brian GernhardtJul 19, 2007

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.