Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-03-20 01:03:12 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-20 01:03:12 +0300
commitfc1a4ce043e4b07d1551a24ec224bd43b9405ec8 (patch)
tree973c130cb04cf972d6b82b98f6f0ca6aaa850eda /t
parent0717a424a723201c4b77da3638764c70819c3f63 (diff)
parent15a4cc912e601c1641e549861e284f63e30f562c (diff)
Merge branch 'ab/fix-strategy-opts-parsing'
The code to parse "git rebase -X<opt>" was not prepared to see an unparsable option string, which has been corrected. * ab/fix-strategy-opts-parsing: sequencer.c: fix overflow & segfault in parse_strategy_opts()
Diffstat (limited to 't')
-rwxr-xr-xt/t3436-rebase-more-options.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh
index 94671d3c46..c3184c9ade 100755
--- a/t/t3436-rebase-more-options.sh
+++ b/t/t3436-rebase-more-options.sh
@@ -40,6 +40,24 @@ test_expect_success 'setup' '
EOF
'
+test_expect_success 'bad -X <strategy-option> arguments: unclosed quote' '
+ cat >expect <<-\EOF &&
+ fatal: could not split '\''--bad'\'': unclosed quote
+ EOF
+ test_expect_code 128 git rebase -X"bad argument\"" side main >out 2>actual &&
+ test_must_be_empty out &&
+ test_cmp expect actual
+'
+
+test_expect_success 'bad -X <strategy-option> arguments: bad escape' '
+ cat >expect <<-\EOF &&
+ fatal: could not split '\''--bad'\'': cmdline ends with \
+ EOF
+ test_expect_code 128 git rebase -X"bad escape \\" side main >out 2>actual &&
+ test_must_be_empty out &&
+ test_cmp expect actual
+'
+
test_expect_success '--ignore-whitespace works with apply backend' '
test_must_fail git rebase --apply main side &&
git rebase --abort &&