3 test_description
='merge with sparse files'
5 TEST_CREATE_REPO_NO_TEMPLATE
=1
8 # test_file $filename $content
14 # test_commit_this $message_and_tag
20 test_expect_success
'setup' '
21 test_file checked-out init &&
22 test_file modify_delete modify_delete_init &&
23 test_commit_this init &&
24 test_file modify_delete modify_delete_theirs &&
25 test_commit_this theirs &&
26 git reset --hard init &&
27 git rm modify_delete &&
28 test_commit_this ours &&
29 git config core.sparseCheckout true &&
31 echo "/checked-out" >.git/info/sparse-checkout &&
33 test_must_fail git merge theirs
36 test_expect_success
'reset --hard works after the conflict' '
40 test_expect_success
'is reset properly' '
41 git status --porcelain -- modify_delete >out &&
42 test_must_be_empty out &&
43 test_path_is_missing modify_delete
46 test_expect_success
'setup: conflict back' '
47 test_must_fail git merge theirs
50 test_expect_success
'Merge abort works after the conflict' '
54 test_expect_success
'is aborted properly' '
55 git status --porcelain -- modify_delete >out &&
56 test_must_be_empty out &&
57 test_path_is_missing modify_delete