It appears to insert less blank lines the closer I type the command to the bottom of the terminal window. If I type it at the top of the terminal window, it inserts nearly a full window height of blank lines; if I type it at the very bottom, no blank lines are inserted.
It seems like the pager program is pushing output to the bottom of the terminal window, but I want the output to be right below my command or at the top, like in Linux git.
I can get expected behavior by using git --no-pager log
, but what if I want to use a pager?
Just to add a few elements:
msysgit was already discussing alternative consoles in issue 29 back a year ago (mid-2009: mintty, but for cygwin only, a capturing window I/O).
The issue 369 mentions the option "git config pager.log off
" to disable paging for "log", which can come in handy for certain scenario similar to the one the OP mentions.
A similar problem is being discussed right now (May 2010) in issue 484 (by none other than SO user kusma as he points out in the comments ;) )
I can reproduce this, but I don't think it's an issue with git itself. It's the pager; less on msys has some serious issues. Some experiments with less shows that the culprit seems to be the -R flag:
$ git --no-pager diff --color=always HEAD~1 TestSegmentedText.java | less -R