Thread (14 messages) flat view 14 messages, 2 authors, 2016-06-16
STALE3742d

[PATCH 04/10] shell helpers usage: always send help to stderr

From: Stefan Beller <hidden>
Date: 2016-06-16 02:19:05
Subsystem: the rest · Maintainer: Linus Torvalds

`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.

Signed-off-by: Stefan Beller <redacted>
---
 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
 	}
 
-- 
2.8.0.32.g71f8beb.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help