Skip to content

Commit cdecb85

Browse files
committed
t1092: add cherry-pick, rebase tests
Add tests to check that cherry-pick and rebase behave the same in the sparse-index case as in the full index cases. These tests are agnostic to GIT_TEST_MERGE_ALGORITHM, so a full CI test suite will check both the 'ort' and 'recursive' strategies on this test. Signed-off-by: Derrick Stolee <[email protected]>
1 parent df49b5f commit cdecb85

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

t/t1092-sparse-checkout-compatibility.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,14 +481,17 @@ test_expect_success 'checkout and reset (mixed) [sparse]' '
481481
test_sparse_match git reset update-folder2
482482
'
483483

484-
test_expect_success 'merge' '
484+
test_expect_success 'merge, cherry-pick, and rebase' '
485485
init_repos &&
486486
487-
test_all_match git checkout -b merge update-deep &&
488-
test_all_match git merge -m "folder1" update-folder1 &&
489-
test_all_match git rev-parse HEAD^{tree} &&
490-
test_all_match git merge -m "folder2" update-folder2 &&
491-
test_all_match git rev-parse HEAD^{tree}
487+
for OPERATION in "merge -m merge" cherry-pick rebase
488+
do
489+
test_all_match git checkout -B temp update-deep &&
490+
test_all_match git $OPERATION update-folder1 &&
491+
test_all_match git rev-parse HEAD^{tree} &&
492+
test_all_match git $OPERATION update-folder2 &&
493+
test_all_match git rev-parse HEAD^{tree} || return 1
494+
done
492495
'
493496

494497
# NEEDSWORK: This test is documenting current behavior, but that

0 commit comments

Comments
 (0)