Skip to content

Commit 34cb704

Browse files
dotdashgitster
authored andcommitted
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 6cbf07e 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>
1 parent d8e21ba commit 34cb704

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-commit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ unset only
322322
case "$all,$interactive,$also,$#" in
323323
*t,*t,*)
324324
die "Cannot use -a, --interactive or -i at the same time." ;;
325-
t,,[1-9]*)
325+
t,,,[1-9]*)
326326
die "Paths with -a does not make sense." ;;
327-
,t,[1-9]*)
327+
,t,,[1-9]*)
328328
die "Paths with --interactive does not make sense." ;;
329329
,,t,0)
330330
die "No paths with -i does not make sense." ;;

0 commit comments

Comments
 (0)