Skip to content

Commit

Permalink
t1092: add cherry-pick, rebase tests
Browse files Browse the repository at this point in the history
Add tests to check that cherry-pick and rebase behave the same in the
sparse-index case as in the full index cases.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
  • Loading branch information
derrickstolee committed Aug 17, 2021
1 parent d29ed6c commit d58895b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions t/t1092-sparse-checkout-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -486,14 +486,17 @@ test_expect_success 'checkout and reset (mixed) [sparse]' '
test_sparse_match git reset update-folder2
'

test_expect_success 'merge' '
test_expect_success 'merge, cherry-pick, and rebase' '
init_repos &&
test_all_match git checkout -b merge update-deep &&
test_all_match git merge -m "folder1" update-folder1 &&
test_all_match git rev-parse HEAD^{tree} &&
test_all_match git merge -m "folder2" update-folder2 &&
test_all_match git rev-parse HEAD^{tree}
for OPERATION in "merge -s ort -m merge" cherry-pick rebase
do
test_all_match git checkout -B temp update-deep &&
test_all_match git $OPERATION update-folder1 &&
test_all_match git rev-parse HEAD^{tree} &&
test_all_match git $OPERATION update-folder2 &&
test_all_match git rev-parse HEAD^{tree} || return 1
done
'

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

0 comments on commit d58895b

Please sign in to comment.