3 test_description
='merge with sparse files'
5 TEST_CREATE_REPO_NO_TEMPLATE
=1
6 TEST_PASSES_SANITIZE_LEAK
=true
9 # test_file $filename $content
15 # test_commit_this $message_and_tag
21 test_expect_success
'setup' '
22 test_file checked-out init &&
23 test_file modify_delete modify_delete_init &&
24 test_commit_this init &&
25 test_file modify_delete modify_delete_theirs &&
26 test_commit_this theirs &&
27 git reset --hard init &&
28 git rm modify_delete &&
29 test_commit_this ours &&
30 git config core.sparseCheckout true &&
32 echo "/checked-out" >.git/info/sparse-checkout &&
34 test_must_fail git merge theirs
37 test_expect_success
'reset --hard works after the conflict' '
41 test_expect_success
'is reset properly' '
42 git status --porcelain -- modify_delete >out &&
43 test_must_be_empty out &&
44 test_path_is_missing modify_delete
47 test_expect_success
'setup: conflict back' '
48 test_must_fail git merge theirs
51 test_expect_success
'Merge abort works after the conflict' '
55 test_expect_success
'is aborted properly' '
56 git status --porcelain -- modify_delete >out &&
57 test_must_be_empty out &&
58 test_path_is_missing modify_delete