3

In any repository I run git diff, if there are no differences I get an output like this one:

(lots of empty space)
~
~
~
~
~
~
~
(END)

And if if press q it quits ok. If there are any differences, the differences show right, but also kind of padded by several ~ and empty space above.

The expected result would be for git diff to don't display anything if there are no differences, any idea what could be causing this?

In case it may be related, i recently installed zsh, but I tried running this with bash and the result is the same.

Inian
  • 80,270
  • 14
  • 142
  • 161
undefined
  • 41
  • 1
  • Are there DOS line endings in some files? – tripleee Nov 21 '17 at 09:56
  • 2
    try `git --no-pager diff`. I suspect you have set git to use a pager by default. The output you describe looks like pager output. [See here for more info](https://stackoverflow.com/questions/2183900/how-do-i-prevent-git-diff-from-using-a-pager) – M.M Nov 21 '17 at 09:57
  • yup, that was it. Thanks! – undefined Nov 21 '17 at 18:40

0 Answers0