Skip to content

Commit

Permalink
git-commit.sh: Fix usage checks regarding paths given when they do no…
Browse files Browse the repository at this point in the history
…t 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>
  • Loading branch information
Björn Steinbrink authored and Junio C Hamano committed Nov 6, 2007
1 parent d8e21ba commit 34cb704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ unset only
case "$all,$interactive,$also,$#" in
*t,*t,*)
die "Cannot use -a, --interactive or -i at the same time." ;;
t,,[1-9]*)
t,,,[1-9]*)
die "Paths with -a does not make sense." ;;
,t,[1-9]*)
,t,,[1-9]*)
die "Paths with --interactive does not make sense." ;;
,,t,0)
die "No paths with -i does not make sense." ;;
Expand Down

0 comments on commit 34cb704

Please sign in to comment.