From: Junio C Hamano Date: Mon, 02 May 2016 23:28:10 GMT Subject: Re: [PATCH 04/10] shell helpers usage: always send help to stderr Message-ID: In-Reply-To: <1461976845-18228-5-git-send-email-sbeller@google.com> Stefan Beller writes: > `git submodule asdf` would trigger displaying the usage of the submodule > command on stderr, however `git submodule -h` would display the usage on > stdout. Unify displaying help for shell commands on stderr. The primary output from "git cmd --help" is the usage message. It is debatable why it should go to the standard error output when it is the primary thing the user asked for. > > Signed-off-by: Stefan Beller > --- > git-sh-setup.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/git-sh-setup.sh b/git-sh-setup.sh > index c48139a..5c02446 100644 > --- a/git-sh-setup.sh > +++ b/git-sh-setup.sh > @@ -65,7 +65,7 @@ say () { > > if test -n "$OPTIONS_SPEC"; then > usage() { > - "$0" -h > + "$0" -h 1>&2 > exit 1 > }