Re: [PATCH] diff: don't run pager if user asked for a diff style exit code
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 13, 2007, 23:42 UTC
- Message-ID
- <7v7inzf1cm.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <46BF478F.7030603@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
Show 7 quoted lines
> As Wincent Colaiuta found out, it's a bit unexpected for git diff to > start a pager even when the --quiet option is specified. The problem > is that the pager hides the return code -- which is the only output > we're interested in in this case. > > Push pager setup down into builtin-diff.c and don't start the pager > if --exit-code or --quiet (which implies --exit-code) was specified.
Surprisingly nice, although I would have said "don't use git-diff wrapper from scripts, use underlying diff-* plumbing" ;-).
Thanks.