diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-11-20 12:02:01 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-11-21 13:40:46 +0900 |
| commit | 7e097e27d3a9a5a8517d8ed139dcfdb1a21fd87a (patch) | |
| tree | 58f4a3444232a3f82212cc09ff7ef0a1618b2ed5 | |
| parent | 04519d72011478e17b2dbb177820ef2c886b8e5f (diff) | |
| download | git-7e097e27d3a9a5a8517d8ed139dcfdb1a21fd87a.tar.xz | |
legacy-rebase: backport -C<n> and --whitespace=<option> checks
Since 04519d720114 (rebase: validate -C<n> and --whitespace=<mode>
parameters early, 2018-11-14), the built-in rebase validates the -C and
--whitespace arguments early. As this commit also introduced a
regression test for this, and as a later commit introduced the
GIT_TEST_REBASE_USE_BUILTIN mode to run tests, we now have a
"regression" in the scripted version of `git rebase` on our hands.
Backport the validation to fix this.
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rwxr-xr-x | git-legacy-rebase.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-legacy-rebase.sh b/git-legacy-rebase.sh index 75a08b2683..b97ffdc9dd 100755 --- a/git-legacy-rebase.sh +++ b/git-legacy-rebase.sh @@ -337,6 +337,11 @@ do fix|strip) force_rebase=t ;; + warn|nowarn|error|error-all) + ;; # okay, known whitespace option + *) + die "fatal: Invalid whitespace option: '${1#*=}'" + ;; esac ;; --ignore-whitespace) @@ -352,6 +357,9 @@ do git_am_opt="$git_am_opt $1" force_rebase=t ;; + -C*[!0-9]*) + die "fatal: switch \`C' expects a numerical value" + ;; -C*) git_am_opt="$git_am_opt $1" ;; |
