git-sh-setup.sh: use dashdash with basename call
Calling basename on a argument that starts with a dash, like a login shell, will result in an error. Add '--' before the argument so that the argument is interpreted properly. Signed-off-by: Dan Wyand <danwyand@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
7fa1365c54
commit
7d665f3584
|
@ -81,7 +81,7 @@ if test -n "$OPTIONS_SPEC"; then
|
|||
echo exit $?
|
||||
)"
|
||||
else
|
||||
dashless=$(basename "$0" | sed -e 's/-/ /')
|
||||
dashless=$(basename -- "$0" | sed -e 's/-/ /')
|
||||
usage() {
|
||||
die "usage: $dashless $USAGE"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue