git-commit.sh: Fix usage checks regarding paths given when they do not make sense
The checks that looked for paths given to git-commit in addition to --all or --interactive expected only 3 values, while the case statement actually provides 4, so the check was never triggered. The bug was introduced in 6cbf07efc5702351897dee4742525c9b9f7828ac when the case statement was extended to handle --interactive. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Björn Steinbrink committed
Nov 5, 2007 at 20:36 UTC
34cb704a9b8b45ff3e1342678c5892e1ee6e27f5
1 file changed
+2
-2
git-commit.sh
+2
-2
@@ -322,9 +322,9 @@ unset only
322
case "$all,$interactive,$also,$#" in
323
*t,*t,*)
324
die "Cannot use -a, --interactive or -i at the same time." ;;
325
-t,,[1-9]*)
325
+t,,,[1-9]*)
326
die "Paths with -a does not make sense." ;;
327
-,t,[1-9]*)
327
+,t,,[1-9]*)
328
die "Paths with --interactive does not make sense." ;;
329
,,t,0)
330
die "No paths with -i does not make sense." ;;