]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/rebase.c
rebase: validate -C<n> and --whitespace=<mode> parameters early
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 14 Nov 2018 16:25:31 +0000 (08:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Nov 2018 02:52:13 +0000 (11:52 +0900)
commit04519d72011478e17b2dbb177820ef2c886b8e5f
treee93d9866e52086e05489d8c20b40d089a690304b
parentf57696802c300494562f4287e88f07540b3dbd4a
rebase: validate -C<n> and --whitespace=<mode> parameters early

It is a good idea to error out early upon seeing, say, `-Cbad`, rather
than starting the rebase only to have the `--am` backend complain later.

Let's do this.

The only options accepting parameters which we pass through to `git am`
(which may, or may not, forward them to `git apply`) are `-C` and
`--whitespace`. The other options we pass through do not accept
parameters, so we do not have to validate them here.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c
t/t3406-rebase-message.sh