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

Re: Cygwin + git log = no pager!

From
Jeff King <peff@peff.net>
Date
Feb 24, 2014, 09:06 UTC
Message-ID
<20140224090618.GB10698@sigill.intra.peff.net>
In-Reply-To
<530AFAFD.2060504@gmail.com>
On Mon, Feb 24, 2014 at 08:55:41PM +1300, Chris Packham wrote:
Show 11 quoted lines
> > Thanks for the response. I did set this environment variable in my
> > .bashrc like so:
> > 
> > export GIT_PAGER=less
> > 
> > However after I do a 'git log' it is just spitting it out all at once
> > and not entering the pager.
> > 
> 
> Um OK that was the obvious thing to try. There is also the config
> variable core.pager but GIT_PAGER should take precedence.

Presumably we are actually running what's in GIT_PAGER, but we can double-check with:

  GIT_PAGER='echo custom pager' git log
You can also try:
  GIT_TRACE=1 git log
which should describe the pager being run.
> Could something be setting the environment variable LESS? Reading the
> git-config man page for core.pager git wants to set LESS to FRSX but if
> it is already set git takes that as an indication that you don't want to
> set LESS automatically.
We can also double-check the LESS setting in the executed pager:
  GIT_PAGER='echo LESS=$LESS' git log

If we are running less, and it is using FRSX, I'd suspect some kind of terminal weirdness with less itself. With "-F", less will quit if the whole output can be displayed; it's possible it thinks the screen is bigger than it is.

Trying:
  GIT_PAGER=less LESS=RSX git log
might help.
-Peff
Previous: Chris PackhamNext: Robert Dailey
Message 5 of 11 in “Cygwin + git log = no pager!”
  1. Robert DaileyFeb 22, 2014
  2. Chris PackhamFeb 22, 2014
  3. Robert DaileyFeb 23, 2014
  4. Chris PackhamFeb 24, 2014
  5. Jeff KingFeb 24, 2014
  6. Robert DaileyFeb 24, 2014
  7. Jeff KingFeb 26, 2014
  8. Robert DaileyFeb 26, 2014
  9. Robert DaileyFeb 26, 2014
  10. Jeff KingFeb 27, 2014
  11. Chris PackhamFeb 27, 2014

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.