···10771077 test_cmp expect actual
10781078'
1079107910801080+test_expect_success 'reset -p with unmerged files' '
10811081+ test_when_finished "git checkout --force main" &&
10821082+ test_commit one conflict &&
10831083+ git checkout -B side HEAD^ &&
10841084+ test_commit two conflict &&
10851085+ test_must_fail git merge one &&
10861086+10871087+ # this is a noop with only an unmerged entry
10881088+ git reset -p &&
10891089+10901090+ # add files that sort before and after unmerged entry
10911091+ echo a >a &&
10921092+ echo z >z &&
10931093+ git add a z &&
10941094+10951095+ # confirm that we can reset those files
10961096+ printf "%s\n" y y | git reset -p &&
10971097+ git diff-index --cached --diff-filter=u HEAD >staged &&
10981098+ test_must_be_empty staged
10991099+'
11001100+10801101test_done