{"thread":{"id":"43779","subject":"'git diff HEAD' pager quirks","startedAt":"2006-12-14T22:01:46Z","lastAt":"2006-12-14T22:01:46Z","messageCount":1,"participants":["Jeff Garzik"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"298673","messageId":"4581C9CA.5060207@garzik.org","threadId":"43779","inReplyTo":null,"subject":"'git diff HEAD' pager quirks","fromName":"Jeff Garzik","fromEmail":"jeff@garzik.org","sentAt":"2006-12-14T22:01:46Z","receivedAt":"2006-12-14T22:01:46Z","isPatch":false,"sender":{"key":"jeff@garzik.org","avatar":null},"body":"So, after a 'yum upgrade' brought me git-core-1.4.4.2-2.fc6, I \ndiscovered that \"git diff HEAD\" will produce paged output, if at a tty. \n  Nice, I like the improvement.\n\nHowever, when there is no output at all (nothing dirty in working dir), \n\"git diff HEAD\" will sometimes invoke $PAGER (\"/usr/bin/less\" here) \n__anyway__.\n\nThis causes the cursor to jump down 20-30 lines, before returning the \ncommand prompt.  Annoying.  Example follows.\n\n\tJeff\n\n\n---------------------<begin BEFORE>----------------------------\n[jgarzik@pretzel libata-dev]$ git diff HEAD\n[jgarzik@pretzel libata-dev]$\n---------------------<end BEFORE>------------------------------\n\n---------------------<begin AFTER>-----------------------------\n[jgarzik@pretzel libata-dev]$ git diff HEAD\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n[jgarzik@pretzel libata-dev]$\n"}]}