git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Sitaram Chamarty <sitaramc@gmail.com>
Cc: Clemens Buchacher <drizzd@aon.at>,
	Junio C Hamano <gitster@pobox.com>,
	Lynn Lin <lynn.xin.lin@gmail.com>,
	git@vger.kernel.org
Subject: Re: git push output goes into stderr
Date: Thu, 8 Sep 2011 03:07:06 -0400	[thread overview]
Message-ID: <20110908070706.GA1454@sigill.intra.peff.net> (raw)
In-Reply-To: <CAMK1S_gro=THLkc_wrHSLwUVaJp9k-zRDuFDQpOGaiyBTHiDnQ@mail.gmail.com>

On Thu, Sep 08, 2011 at 11:12:48AM +0530, Sitaram Chamarty wrote:

> > But with a program whose main function is to perform an action, like
> > "git push", I think there are really two ways to look at it:
> >
> >  1. There is no main output; any progress or status update is just
> >     diagnostic chat, and should go to stderr.
> >
> >  2. The main output is the status report; it goes to stdout, and
> >     progress updates go to stderr.
> 
> I always thought if you write stuff to stdout the remote client gets
> confused because it is executing to a defined protocol and suddenly
> sees unexpected input in the middle.
> 
> Bit if *you* are saying this (output random stuff to STDOUT) can
> happen if we want it to, clearly I was wrong...

For the remote side, yes, we have to be sure not to pollute stdout,
because that's where the protocol is going.. But the status table is
generated on the client side, so stdout is just connected to the user's
terminal there.

We already generate --porcelain status output from push on stdout (and
again, that makes sense to me philosophically, because the user is
asking push to generate the output). So it's clearly not a big deal.
It's just a matter of taste.

-Peff

  reply	other threads:[~2011-09-08  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-04  9:26 git push output goes into stderr Lynn Lin
2011-09-05  0:57 ` Junio C Hamano
2011-09-06  7:49   ` Clemens Buchacher
2011-09-07 21:57     ` Jeff King
2011-09-08  5:42       ` Sitaram Chamarty
2011-09-08  7:07         ` Jeff King [this message]
2011-09-08  8:24           ` Sitaram Chamarty
2011-09-05  4:39 ` Sitaram Chamarty

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=20110908070706.GA1454@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lynn.xin.lin@gmail.com \
    --cc=sitaramc@gmail.com \
    /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).