On Tue, Jul 22, 2008 at 02:06:43AM -0400, Jeff King wrote: > On Tue, Jul 22, 2008 at 07:39:21AM +0200, Mike Hommey wrote: > > > > This marks diff-files as FORBID_PAGER; I will leave it to others to > > > fight about which commands should have it. But it doesn't make sense to > > > mark "status" since some people obviously _want_ the paging there. > > > > Why not "simply" forbid the pager when output is not a terminal ? > > We already do that (see pager.c:53). The original poster still had a > problem, but I don't know if it was for actual usage or simply a toy > > $ git status > $ echo $? > $ echo "why don't exit codes work in status?" | mail git@vger > > question. As you said in another branch of the thread, this part would be solved by having parent/child being reverted. Now, for the case where diff-files can have a pager if the user shoots himself in the foot, if the output is not a terminal and pager.c already does the right thing, I don't see where diff-files having a pager will be a problem. If diff-files' output is a terminal, it's obviously intended to be displayed, be it in a script or not. But most of the time, its output will be piped, thus not triggering the pager anyways. And for diff-files' exit code, well, see the first paragraph. Mike -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html