From: Junio C Hamano <gitster@pobox.com>
To: "Matěj Cepl" <mcepl@cepl.eu>
Cc: "Jonas Konrad" <jonas.konrad@uni-muenster.de>, <git@vger.kernel.org>
Subject: Re: Git branch outputs usage message on stderr
Date: Wed, 15 Jan 2025 07:28:34 -0800 [thread overview]
Message-ID: <xmqqed1414gt.fsf@gitster.g> (raw)
In-Reply-To: <D72M6S9O1E9F.WVEBV7ZJ1JTC@cepl.eu> ("Matěj Cepl"'s message of "Wed, 15 Jan 2025 12:36:15 +0100")
Matěj Cepl <mcepl@cepl.eu> writes:
> On Wed Jan 15, 2025 at 12:22 PM CET, Jonas Konrad wrote:
>> What did you do before the bug happened? (Steps to reproduce your issue)
>> I opened a terminal on Arch Linux with a bash shell and called `git
>> branch -h` to get a usage overview of git's `branch` command. I then
>> tried processing the output with `grep` by `git branch -h | grep list`
>> which gave the whole (unfiltered) output, i.e., the displayed message
>> was not processed by `grep`.
>
> And that is exactly the correct behaviour. In the world of UNIX,
> where pipes are normal, utilities should send to the stdout
> only substantial material, ...
If I understand the case Jonas reports correctly, he is talking
about "git branch -h<RETURN>", and the "substantial material" (I'd
rather phrase it as the primary output in response to the end user
request) in that case is the help text.
Somebody may want to go over "git help --all" and for each of them
try "git $cmd -h >/dev/null" to find those that give the help output
to their standard error stream.
Thanks, both.
next prev parent reply other threads:[~2025-01-15 15:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 11:21 Git branch outputs usage message on stderr Jonas Konrad
2025-01-15 11:36 ` Matěj Cepl
2025-01-15 14:47 ` Jonas Konrad
2025-01-15 15:28 ` Junio C Hamano [this message]
2025-01-15 16:55 ` Kristoffer Haugsbakk
2025-01-15 17:14 ` Jeff King
2025-01-15 17:49 ` Junio C Hamano
2025-01-15 17:56 ` Junio C Hamano
2025-01-15 18:24 ` Jeff King
2025-01-15 21:16 ` Junio C Hamano
2025-01-15 21:29 ` Jeff King
2025-01-15 21:56 ` Junio C Hamano
2025-01-15 22:27 ` Jeff King
2025-01-15 23:32 ` Junio C Hamano
2025-01-16 1:21 ` Junio C Hamano
2025-01-16 10:24 ` Jeff King
2025-01-15 22:11 ` Junio C Hamano
2025-01-15 22:28 ` Jeff King
2025-01-15 23:35 ` Junio C Hamano
2025-01-15 18:29 ` Junio C Hamano
2025-01-15 18:33 ` Kristoffer Haugsbakk
2025-01-15 21:13 ` Junio C Hamano
2025-01-15 17:14 ` Jonas Konrad
2025-01-15 17:53 ` Kristoffer Haugsbakk
2025-01-15 17:19 ` Junio C Hamano
2025-01-15 17:39 ` Kristoffer Haugsbakk
2025-01-15 17:47 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqed1414gt.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jonas.konrad@uni-muenster.de \
--cc=mcepl@cepl.eu \
/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).