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

Re: Cygwin + git log = no pager!

From
Chris Packham <judge.packham@gmail.com>
Date
Feb 24, 2014, 07:55 UTC
Message-ID
<530AFAFD.2060504@gmail.com>
In-Reply-To
<CAHd499AbsUwmA0HWu31jW2n8eUNnRtU7URKPfBU7EhU6-F48zg@mail.gmail.com>
On 24/02/14 09:33, Robert Dailey wrote:
Show 24 quoted lines
> On Sat, Feb 22, 2014 at 1:39 AM, Chris Packham <judge.packham@gmail.com> wrote:
>> On 22/02/14 18:18, Robert Dailey wrote:
>>> So it seems that the pager doesn't work by default when running `git
>>> log` from Cygwin like it does in msysgit for Windows.
>>>
>>> I know I can pipe to `less` but that requires the additional typing
>>> obviously. Does anyone know how I can get the pager to work in Cygwin
>>> for git log, reflog, and other commands like it does in msysgit?
>>>
>>> Thanks in advance.
>>
>> Add GIT_PAGER=less to your environment. I don't know if you were using
>> the cygwin packaged git or building from source but I'm surprised the
>> pager is not set by default as you actually have to define the use of
>> something other than less.
> 
> 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.

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.

If neither of those help you probably want to let us know your cygwin version as well as your git version and how you installed git (i.e. built from source or installed via cygwin).

Previous: Robert DaileyNext: Jeff King
Message 4 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.