3 test_description='merge with sparse files'
7 # test_file $filename $content
13 # test_commit_this $message_and_tag
19 test_expect_success 'setup' '
20 test_file checked-out init &&
21 test_file modify_delete modify_delete_init &&
22 test_commit_this init &&
23 test_file modify_delete modify_delete_theirs &&
24 test_commit_this theirs &&
25 git reset --hard init &&
26 git rm modify_delete &&
27 test_commit_this ours &&
28 git config core.sparseCheckout true &&
29 echo "/checked-out" >.git/info/sparse-checkout &&
31 test_must_fail git merge theirs
34 test_expect_success 'reset --hard works after the conflict' '
38 test_expect_success 'is reset properly' '
39 git status --porcelain -- modify_delete >out &&
40 test_must_be_empty out &&
41 test_path_is_missing modify_delete
44 test_expect_success 'setup: conflict back' '
45 test_must_fail git merge theirs
48 test_expect_success 'Merge abort works after the conflict' '
52 test_expect_success 'is aborted properly' '
53 git status --porcelain -- modify_delete >out &&
54 test_must_be_empty out &&
55 test_path_is_missing modify_delete