git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mike Hommey <mh@glandium.org>,
	git@vger.kernel.org, David Bremner <bremner@unb.ca>
Subject: Re: git status in clean working dir
Date: Tue, 22 Jul 2008 05:40:55 -0400	[thread overview]
Message-ID: <20080722094054.GA5720@sigill.intra.peff.net> (raw)
In-Reply-To: <7viquymg5k.fsf@gitster.siamese.dyndns.org>

On Tue, Jul 22, 2008 at 02:17:43AM -0700, Junio C Hamano wrote:

> Another slight worry I have is if the now-parent git process does the
> right thing when the user kills the pager without viewing the output to
> the end.  git itself will get stuck with write() while the user is
> reading, and then notice that the pipe does not have any more reader when
> the pager is killed.  This fact itself won't change by swapping the
> parent-child relationship, but would we get a sensible behaviour after
> that, or have we been ignoring what happens afterwards only because our
> exit status has been hidden behind the pager?  Running "git log" and
> killing it by "q" (my pager is "less") makes it exit with 141.

Hmm, good point. Though previously in this case, we were getting
whatever code the pager provided. Which means nobody probably cared that
much. Though I suppose that people who use "$?" in their prompt might
see scariness.

> I shouldn't worry, if everything is written correctly in the other parts
> of the system, this swap should not have much ill effect.

I am a little unhappy about the git process hanging around, but I don't
know if it is worth making a meta-process just to manage the pager.

Also, I think people with a pager that has spaces in in it will now need
to quote it (e.g., PAGER="/path with space/less" used to work, but now
is passed to the shell). Arguably, this brings it in line with other
spawned programs, like EDITOR, but it is a difference, and we are in
release freeze. That could be fixed with some magic in run_command.
(Note that it has always been run by the shell under Windows, so again,
this is making things more consistent).

> By the way [2/2] was not signed-off.  Just forgotten?

Yes, forgotten. If you are planning on applying, please forge (and
squash the portability fix).

-Peff

  reply	other threads:[~2008-07-22  9:41 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
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 [this message]
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=20080722094054.GA5720@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=bremner@unb.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    /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).