3 test_description
='reset --hard unmerged'
7 test_expect_success setup
'
14 git add before hello later &&
15 git commit -m world &&
17 H=$(git rev-parse :hello) &&
18 git rm --cached hello &&
19 echo "100644 $H 2 hello" | git update-index --index-info &&
24 test "$(git ls-files -o)" = hello/world
28 test_expect_success
'reset --hard should restore unmerged ones' '
31 git ls-files --error-unmatch before/1 before/2 hello later/3 &&
36 test_expect_success
'reset --hard did not corrupt index or cache-tree' '
38 T=$(git write-tree) &&
40 git add before hello later &&
41 U=$(git write-tree) &&