]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-rebase: don't ignore unexpected command line arguments
authorBrandon Casey <drafnel@gmail.com>
Sun, 17 Sep 2017 22:28:17 +0000 (15:28 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Sep 2017 03:13:09 +0000 (12:13 +0900)
Currently, git-rebase will silently ignore any unexpected command-line
switches and arguments (the command-line produced by git rev-parse).
This allowed the rev-parse bug, fixed in the preceding commits, to go
unnoticed.  Let's make sure that doesn't happen again.  We shouldn't be
ignoring unexpected arguments.  Let's not.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh

index 2cf73b88e8e83ca34b9eb319dbc2b0a220139b0f..45f187bdbfee23a3ebd99fb2efb42ba893d13963 100755 (executable)
@@ -348,6 +348,9 @@ do
                shift
                break
                ;;
+       *)
+               usage
+               ;;
        esac
        shift
 done