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>

Dan Wyand committed Nov 24, 2014 at 18:03 UTC 7d665f35849309faaa73cdfbf23210950cd4389d
1 file changed +1 -1
git-sh-setup.sh
+1 -1
@@ -81,7 +81,7 @@ if test -n "$OPTIONS_SPEC"; then
81 echo exit $?
82 )"
83 else
84 - dashless=$(basename "$0" | sed -e 's/-/ /')
84 + dashless=$(basename -- "$0" | sed -e 's/-/ /')
85 usage() {
86 die "usage: $dashless $USAGE"
87 }