# 'git diff HEAD' pager quirks

1 messages from 2006-12-14 to 2006-12-14. Participants: Jeff Garzik.
Thread: https://gitlist.dev/t/43779

## Jeff Garzik, 2006-12-14 22:01

Subject: 'git diff HEAD' pager quirks
Message-ID: <4581C9CA.5060207@garzik.org>
URL: https://gitlist.dev/e/4581C9CA.5060207%40garzik.org

```
So, after a 'yum upgrade' brought me git-core-1.4.4.2-2.fc6, I 
discovered that "git diff HEAD" will produce paged output, if at a tty. 
  Nice, I like the improvement.

However, when there is no output at all (nothing dirty in working dir), 
"git diff HEAD" will sometimes invoke $PAGER ("/usr/bin/less" here) 
__anyway__.

This causes the cursor to jump down 20-30 lines, before returning the 
command prompt.  Annoying.  Example follows.

	Jeff


---------------------<begin BEFORE>----------------------------
[jgarzik@pretzel libata-dev]$ git diff HEAD
[jgarzik@pretzel libata-dev]$
---------------------<end BEFORE>------------------------------

---------------------<begin AFTER>-----------------------------
[jgarzik@pretzel libata-dev]$ git diff HEAD



















[jgarzik@pretzel libata-dev]$

```
