Merge branch 'jc/grep-header-all-match-fix'
[gitweb.git] / t / t1011-read-tree-sparse-checkout.sh
index 81ab4c6f37575328d105446a9c619f64b80cc8d7..9a07de1a5b6d3a98c0db0b24cdd9c3a68cef79b5 100755 (executable)
@@ -167,4 +167,13 @@ test_expect_success 'index removal and worktree narrowing at the same time' '
        test_cmp empty result
 '
 
+test_expect_success 'read-tree --reset removes outside worktree' '
+       >empty &&
+       echo init.t >.git/info/sparse-checkout &&
+       git checkout -f top &&
+       git reset --hard removed &&
+       git ls-files sub/added >result &&
+       test_cmp empty result
+'
+
 test_done