summaryrefslogtreecommitdiff
path: root/t/t2071-restore-patch.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2071-restore-patch.sh')
-rwxr-xr-xt/t2071-restore-patch.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t2071-restore-patch.sh b/t/t2071-restore-patch.sh
index 98b2476..b5c5c0f 100755
--- a/t/t2071-restore-patch.sh
+++ b/t/t2071-restore-patch.sh
@@ -60,6 +60,14 @@ test_expect_success PERL 'git restore -p --source=HEAD^' '
verify_state dir/foo parent index
'
+test_expect_success PERL 'git restore -p --source=HEAD^...' '
+ set_state dir/foo work index &&
+ # the third n is to get out in case it mistakenly does not apply
+ test_write_lines n y n | git restore -p --source=HEAD^... &&
+ verify_saved_state bar &&
+ verify_state dir/foo parent index
+'
+
test_expect_success PERL 'git restore -p handles deletion' '
set_state dir/foo work index &&
rm dir/foo &&