git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, David Bremner <bremner@unb.ca>
Subject: Re: git status in clean working dir
Date: Tue, 22 Jul 2008 08:18:07 +0200	[thread overview]
Message-ID: <20080722061807.GA6714@glandium.org> (raw)
In-Reply-To: <20080722060643.GA25023@sigill.intra.peff.net>

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

  reply	other threads:[~2008-07-22  6:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-21 23:13 git status in clean working dir David Bremner
2008-07-22  2:30 ` Junio C Hamano
2008-07-22  2:36   ` Abhijit Menon-Sen
2008-07-22  2:40   ` Junio C Hamano
2008-07-22  2:48     ` Junio C Hamano
2008-07-22  4:44       ` Jeff King
2008-07-22  4:52         ` Jeff King
2008-07-22 11:24           ` Johannes Schindelin
2008-07-22  4:41     ` Jeff King
2008-07-22  5:39       ` Mike Hommey
2008-07-22  6:06         ` Jeff King
2008-07-22  6:18           ` Mike Hommey [this message]
2008-07-22  6:46             ` Jeff King
2008-07-22  7:10               ` Jeff King
2008-07-22  7:12                 ` [PATCH 1/2] run-command: add pre-exec callback Jeff King
2008-07-22  7:14                   ` [PATCH 2/2] spawn pager via run_command interface Jeff King
2008-07-22  7:16                     ` Jeff King
2008-07-22  7:31                       ` Pierre Habouzit
2008-07-22  7:49                         ` Jeff King
2008-07-22  7:48                       ` Johannes Sixt
2008-07-22  7:50                         ` Jeff King
2008-07-22  8:29                           ` Johannes Sixt
2008-07-22  9:17                 ` git status in clean working dir Junio C Hamano
2008-07-22  9:40                   ` Jeff King
2008-07-22 14:10           ` David Bremner
2008-07-22  7:34       ` Johannes Sixt
2008-07-22  7:46         ` Jeff King
2008-07-22  7:54           ` Johannes Sixt
2008-07-24  6:56     ` Ask Bjørn Hansen
2008-07-24 16:54       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080722061807.GA6714@glandium.org \
    --to=mh@glandium.org \
    --cc=bremner@unb.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).