git-summary: reject invalid option

Argument starts with '-' can't be committish, so we can safely reject
it.
This commit is contained in:
spacewander 2020-12-16 18:01:30 +08:00
parent c675d0afb8
commit 16c1f0d3dc

View file

@ -13,6 +13,10 @@ for arg in "$@"; do
--dedup-by-email)
DEDUP_BY_EMAIL=1
;;
-*)
>&2 echo "unknown argument $arg found"
exit 1
;;
*)
# set the argument back
set -- "$@" "$arg"