[PATCH 8/25] git-fetch: Print usage message if we get an unrecognized option.
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
git-fetch.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
50d509080e5cf32880bf412133473557f9e5f5b2
diff --git a/git-fetch.sh b/git-fetch.sh
index 14ea295..18b421d 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -2,6 +2,11 @@
#
. git-sh-setup
. git-parse-remote
+
+usage () {
+ die "usage: $0 <fetch-options> <repository> <refspec>..."
+}
+
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
@@ -34,6 +39,9 @@ do
-v|--verbose)
verbose=Yes
;;
+ -*)
+ usage
+ ;;
*)
break
;;
--
0.99.9.GIT