Skip to content

Commit

Permalink
shell-scripts usage(): consistently exit with non-zero
Browse files Browse the repository at this point in the history
Earlier conversion of shell scripts to parse-options made usage()
to run "git cmd -h" which in turn emit LONG_USAGE and exit with 0
status.  This is inconsistent with the scripts that do not use
parse-options, whose usage() died with the message, exiting with 1.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Dec 20, 2007
1 parent 0327062 commit 5d29275
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-sh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ die() {

if test -n "$OPTIONS_SPEC"; then
usage() {
exec "$0" -h
"$0" -h
exit 1
}

parseopt_extra=
Expand Down

0 comments on commit 5d29275

Please sign in to comment.