git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jay Asbury <vbjay.net@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Writing to err vs std
Date: Wed, 08 Mar 2023 16:02:57 -0800	[thread overview]
Message-ID: <xmqq7cvqrdu6.fsf@gitster.g> (raw)
In-Reply-To: <CAH74SFS3hFzYzJ6eb2YenJh4-Pf_VBzVTo8axnEtHDyaJUB-jw@mail.gmail.com> (Jay Asbury's message of "Wed, 8 Mar 2023 18:53:51 -0500")

Jay Asbury <vbjay.net@gmail.com> writes:

> I see things like git fetch and other processing writing details to
> stderr and not std.

I assume you meant "not to standard output".  

As a rule of thumb, the core of the output, the information the
end-user asked for, is sent to the standard output, whether it is
machine parseable or otherwise.  And other stuff like progress
meter, warning and advice messages, are sent to the standard error.

This should be documented already in Documentation/CodingGuidelines
for our developers.  Do you think it needs to be documented for
end-users?  I suspect that rather than such "principle", they are
more interested in seeing what message can be squelched with --quiet
and what can be piped to downstream with "git foo |" on case-by-case
basis individually.




  reply	other threads:[~2023-03-09  0:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 23:53 Writing to err vs std Jay Asbury
2023-03-09  0:02 ` Junio C Hamano [this message]
2023-03-09  0:15   ` Jay Asbury
2023-03-09  0:50     ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqq7cvqrdu6.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=vbjay.net@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).