From: Junio C Hamano Date: Thu, 11 Feb 2010 23:23:09 GMT Subject: Re: [PATCH v3 2/3] git-push: clean up some of the output from git push --porcelain Message-ID: <7vwryjpdb6.fsf@alter.siamese.dyndns.org> In-Reply-To: <20100210054957.GG28526@coredump.intra.peff.net> Jeff King writes: > Would it make sense to clear _all_ advice if we are just in porcelain > mode for git-push? That is, let's say I am in "push --porcelain" and I > try to write a reflog entry for a local tracking ref, but my identity is > implicitly picked up from the hostname[1]. Should it trigger > advice_implicit_identity and say "by the way, your identity is implicit" > on stderr or not? > > I would say yes. The advice output should all be on stderr, and the > porcelain output should all be on stdout. So there is no parsing > conflict. And stderr either goes to /dev/null (because the porcelain is > not terminal-based, or doesn't want the terminal screwed up), in which > case the advice does nothing, or stderr goes to the terminal (because > the porcelain is some simple script), in which case the message is > probably something the user would want to see. Hmm, if we make it a rule to send all the advice messages to the standard error stream, wouldn't the logical conclusion be that the hunk you are commenting is unnecessary? "push --porcelain" should give advice just as usual (but we would simply send the advice to the standard error stream).