3 test_description
='reset --hard unmerged'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success setup
'
15 git add before hello later &&
16 git commit -m world &&
18 H=$(git rev-parse :hello) &&
19 git rm --cached hello &&
20 echo "100644 $H 2 hello" | git update-index --index-info &&
25 test "$(git ls-files -o)" = hello/world
29 test_expect_success
'reset --hard should restore unmerged ones' '
32 git ls-files --error-unmatch before/1 before/2 hello later/3 &&
37 test_expect_success
'reset --hard did not corrupt index or cache-tree' '
39 T=$(git write-tree) &&
41 git add before hello later &&
42 U=$(git write-tree) &&