From: Dan Wyand Date: Mon, 24 Nov 2014 23:03:31 +0000 (-0500) Subject: git-sh-setup.sh: use dashdash with basename call X-Git-Tag: v2.3.0-rc0~71^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7d665f35849309faaa73cdfbf23210950cd4389d;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 9447980330..5cdae338b8 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -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" }