diff options
author | Dan Wyand <danwyand@gmail.com> | 2014-11-25 00:03:31 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-11-25 19:06:08 +0100 |
commit | 7d665f35849309faaa73cdfbf23210950cd4389d (patch) | |
tree | 01bb4963b6b80af6c7f3b9bad634a6a43fcf1d5d /git-sh-setup.sh | |
parent | Merge branch 'nd/gitignore-trailing-whitespace' into maint (diff) | |
download | git-7d665f35849309faaa73cdfbf23210950cd4389d.tar.xz git-7d665f35849309faaa73cdfbf23210950cd4389d.zip |
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>
Diffstat (limited to 'git-sh-setup.sh')
-rw-r--r-- | git-sh-setup.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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" } |