Re: --exit-code (and --quiet) broken in git-diff?
- From
David Kastrup <dak@gnu.org>
- Date
- Aug 12, 2007, 13:29 UTC
- Message-ID
- <85bqdcq3sv.fsf@lola.goethe.zz>
- In-Reply-To
- <46BF04F0.5020304@midwinter.com>
Steven Grimm <koreth@midwinter.com> writes:
Show 18 quoted lines
> David Kastrup wrote: >> I think I would call that a mistake. However, I don't see that fixing >> it would actually be useful: if a pager gets called, this means that >> git-diff might die with SIGPIPE (when the user quits the pager), and >> that in turn has pretty much no meaning. So one really needs to >> redirect the output, anyway. >> > > It does sort of make one wonder, though, if there's much point ever > launching a pager when git-diff is run with --quiet -- it will never > produce any output to page, so running a pager is guaranteed to always > be a waste of cycles. > > Unfortunately the pager is launched before the option processing code > knows whether --quiet is being used or not; I'm not sure it's worth > refactoring the pager launch code just to handle this one special > case. (Or are there other cases where programs would want to be able > to control the use of the pager?)
I think it is reasonable not to start the pager at all when there is no bulk material, but just a fixed amount of output such as a summary lines.
-- David Kastrup, Kriemhildstr. 15, 44793 Bochum