git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Pok Man Lau <pokman.pml@gmail.com>
Cc: msysGit <msysgit@googlegroups.com>, git@vger.kernel.org
Subject: Re: Non-error messages appears in STDERR
Date: Mon, 30 May 2011 15:29:42 -0500	[thread overview]
Message-ID: <20110530202942.GA14913@elie> (raw)
In-Reply-To: <86adad09-bba9-4415-834c-c004071fd9c2@l14g2000pro.googlegroups.com>

Hi,

Pok Man Lau wrote:

> I am writing a class library to wrap bin\git.exe and trying to be a
> bit more accurate on error handling. Here are something interesting I
> found so far with git version 1.7.2.3.msysgit.0
>
> Some of the command output returned by git.exe appeared to be STDERR
> instead of STDOUT even they are not error message.
>
> For example:
> checkout <branch_name>
>
> I would expected the message "Switched to branch '<branch_name>'" to
> be a STDOUT, but it appears to be STDERR.

Yes, generally speaking the intent is the "result" or output that
could be conceivably parsed will go to stdout, while progress
information goes to stderr.

I think it would make sense to document this somewhere, e.g., in the
"git help cli" text.  Do you think that's the right place?  Any ideas
for wording?

Thanks much,
Jonathan

           reply	other threads:[~2011-05-30 20:29 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <86adad09-bba9-4415-834c-c004071fd9c2@l14g2000pro.googlegroups.com>]

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=20110530202942.GA14913@elie \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=msysgit@googlegroups.com \
    --cc=pokman.pml@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).