t3510: stop using '-m 1' to force failure mid-sequence of cherry-picks
We are going to allow 'git cherry-pick -m 1' for non-merge commits, so this method to force failure will stop to work. Use '-m 4' instead as it's very unlikely we will ever have such an octopus in this test setup. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sergey Organov committed
Dec 14, 2018 at 07:53 UTC
c812bd4669d8907186dab8aed47f2c83dfb93fff
1 file changed
+6
-2
t/t3510-cherry-pick-sequence.sh
+6
-2
@@ -61,7 +61,11 @@ test_expect_success 'cherry-pick mid-cherry-pick-sequence' '
61
62
test_expect_success 'cherry-pick persists opts correctly' '
63
pristine_detach initial &&
64
- test_expect_code 128 git cherry-pick -s -m 1 --strategy=recursive -X patience -X ours initial..anotherpick &&
64
+ # to make sure that the session to cherry-pick a sequence
65
+ # gets interrupted, use a high-enough number that is larger
66
+ # than the number of parents of any commit we have created
67
+ mainline=4 &&
68
+ test_expect_code 128 git cherry-pick -s -m $mainline --strategy=recursive -X patience -X ours initial..anotherpick &&
69
test_path_is_dir .git/sequencer &&
70
test_path_is_file .git/sequencer/head &&
71
test_path_is_file .git/sequencer/todo &&
@@ -69,7 +73,7 @@ test_expect_success 'cherry-pick persists opts correctly' '
73
echo "true" >expect &&
74
git config --file=.git/sequencer/opts --get-all options.signoff >actual &&
75
test_cmp expect actual &&
72
- echo "1" >expect &&
76
+ echo "$mainline" >expect &&
77
git config --file=.git/sequencer/opts --get-all options.mainline >actual &&
78
test_cmp expect actual &&
79
echo "recursive" >expect &&