Code

[PATCH] Make sure we die if we don't get enough arguments.
authorFredrik Kuivinen <freku045@student.liu.se>
Mon, 12 Sep 2005 21:31:22 +0000 (23:31 +0200)
committerJunio C Hamano <junkio@cox.net>
Mon, 12 Sep 2005 21:53:59 +0000 (14:53 -0700)
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-merge-fredrik.py

index e4c6fe3c61ba3a02045bb7efe0f1f482c7a393d1..27b84867b03f20a1b284e177df8fc95c72a4033e 100755 (executable)
@@ -392,6 +392,9 @@ def usage():
 # This strategy module figures out merge bases itself, so we only
 # get heads.
 
+if len(sys.argv) < 4:
+    usage()
+
 for nextArg in xrange(1, len(sys.argv)):
     if sys.argv[nextArg] == '--':
         if len(sys.argv) != nextArg + 3: