Re: Git branch outputs usage message on stderr
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 15, 2025, 17:19 UTC
- Message-ID
- <xmqq34hkyoys.fsf@gitster.g>
- In-Reply-To
- <c92e7b16-b70d-46f3-9858-2be805c5285f@app.fastmail.com>
"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
Show 13 quoted lines
> On Wed, Jan 15, 2025, at 16:28, Junio C Hamano wrote: >> 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. > > #!/bin/sh > > for cmd in $(git --list-cmds=builtins); do > git $cmd -h >/dev/null > done 2>&1 | grep '^usage: ' \ > | perl -pe 's/^usage:\s*(\(EXPERIMENTAL!\)\s*)?//; s/^(git\s+[a-zA-Z0-9-]+).*/\1/' > > Gives ...
Being consistent is a good idea, and I wanted to first gauge which way we should unify. It seems that those who spit their help text into their standard error stream are indeed in minority?
Thanks.