On 15.01.25 17:55, Kristoffer Haugsbakk wrote:
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 git am [...] For $ git version git version 2.48.0
Was just about to share the very same results, leading to 40 commands out of 142 built-ins outputting their usage info to stderr. Some additions on non-builtins: git-scalar also outputs its usage info to stderr. git-lfs does not have "usage text for -h". I have not tested git-svn and git-cvsserver properly (do not have installed the respective modules). On another note, git-p4 does not know "-h", but then gives usage info - to stdout(!)). Lastly, if you still read, test git-http-backend and git-filter-branch, as they show special behavior.
<<attachment: smime.p7s>>