mirror of
https://github.com/git/git.git
synced 2025-03-30 19:50:22 +00:00
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:
parent
7fa1365c54
commit
7d665f3584
@ -81,7 +81,7 @@ if test -n "$OPTIONS_SPEC"; then
|
|||||||
echo exit $?
|
echo exit $?
|
||||||
)"
|
)"
|
||||||
else
|
else
|
||||||
dashless=$(basename "$0" | sed -e 's/-/ /')
|
dashless=$(basename -- "$0" | sed -e 's/-/ /')
|
||||||
usage() {
|
usage() {
|
||||||
die "usage: $dashless $USAGE"
|
die "usage: $dashless $USAGE"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user