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>
This commit is contained in:
Dan Wyand 2014-11-24 18:03:31 -05:00 коммит произвёл Junio C Hamano
Родитель 7fa1365c54
Коммит 7d665f3584
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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"
}