Documentation: color.* = true means "auto"
[gitweb.git] / git-sh-setup.sh
index f1c4839a9fe2883f1106d9f9ee209fe4b53b3720..5aa62dda15d1c24d0b01845ded4c8bc15e98bf8a 100755 (executable)
@@ -21,12 +21,15 @@ if test -n "$OPTIONS_SPEC"; then
                exec "$0" -h
        }
 
-       [ -n "$OPTIONS_KEEPDASHDASH" ] && parseopt_extra="--keep-dashdash"
-       parsed=$(
+       parseopt_extra=
+       [ -n "$OPTIONS_KEEPDASHDASH" ] &&
+               parseopt_extra="--keep-dashdash"
+
+       eval "$(
                echo "$OPTIONS_SPEC" |
-               git rev-parse --parseopt $parseopt_extra -- "$@"
-       ) &&
-       eval "$parsed" || exit
+                       git rev-parse --parseopt $parseopt_extra -- "$@" ||
+               echo exit $?
+       )"
 else
        usage() {
                die "Usage: $0 $USAGE"