summaryrefslogtreecommitdiff
path: root/t/t2070-restore.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2070-restore.sh')
-rwxr-xr-xt/t2070-restore.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t2070-restore.sh b/t/t2070-restore.sh
index 2650df1966..21c3f84459 100755
--- a/t/t2070-restore.sh
+++ b/t/t2070-restore.sh
@@ -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