With a conflicted index, this used to give us an error. Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- t/t1005-read-tree-reset.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/t/t1005-read-tree-reset.sh b/t/t1005-read-tree-reset.sh index e29cf63..0745685 100755 --- a/t/t1005-read-tree-reset.sh +++ b/t/t1005-read-tree-reset.sh @@ -43,6 +43,21 @@ test_expect_success 'reset should remove remnants from a failed merge' ' ! test -f old ' +test_expect_success 'two-way reset should remove remnants too' ' + read_tree_u_must_succeed --reset -u HEAD && + git ls-files -s >expect && + sha1=$(git rev-parse :new) && + ( + echo "100644 $sha1 1 old" + echo "100644 $sha1 3 old" + ) | git update-index --index-info && + >old && + git ls-files -s && + read_tree_u_must_succeed --reset -u HEAD HEAD && + git ls-files -s >actual && + ! test -f old +' + test_expect_success 'Porcelain reset should remove remnants too' ' read_tree_u_must_succeed --reset -u HEAD && git ls-files -s >expect && -- 1.8.5-rc0-281-g8951339 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html