Skip to content

Commit c812bd4

Browse files
sorganovgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5d826e9 commit c812bd4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

t/t3510-cherry-pick-sequence.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,19 @@ test_expect_success 'cherry-pick mid-cherry-pick-sequence' '
6161

6262
test_expect_success 'cherry-pick persists opts correctly' '
6363
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 &&
6569
test_path_is_dir .git/sequencer &&
6670
test_path_is_file .git/sequencer/head &&
6771
test_path_is_file .git/sequencer/todo &&
6872
test_path_is_file .git/sequencer/opts &&
6973
echo "true" >expect &&
7074
git config --file=.git/sequencer/opts --get-all options.signoff >actual &&
7175
test_cmp expect actual &&
72-
echo "1" >expect &&
76+
echo "$mainline" >expect &&
7377
git config --file=.git/sequencer/opts --get-all options.mainline >actual &&
7478
test_cmp expect actual &&
7579
echo "recursive" >expect &&

0 commit comments

Comments
 (0)