]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t2070-restore.sh
Merge branch 'rs/test-remove-useless-debugging-cat'
[thirdparty/git.git] / t / t2070-restore.sh
index 2650df196670b8a98d7ba558b108e2d07697dfdc..21c3f84459dfe29053bbb0d9a43160a6df33f737 100755 (executable)
@@ -95,4 +95,15 @@ test_expect_success 'restore --ignore-unmerged ignores unmerged entries' '
        )
 '
 
+test_expect_success 'restore --staged adds deleted intent-to-add file back to index' '
+       echo "nonempty" >nonempty &&
+       >empty &&
+       git add nonempty empty &&
+       git commit -m "create files to be deleted" &&
+       git rm --cached nonempty empty &&
+       git add -N nonempty empty &&
+       git restore --staged nonempty empty &&
+       git diff --cached --exit-code
+'
+
 test_done