X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft2016-checkout-patch.sh;h=2144184d790055ab12dfbb53ec10f519de598f72;hb=6cd52edbbd9acc7797cffeba1b849538285ed558;hp=4d1c2e9e099918b5ff4e2e9458e702546f4c9605;hpb=712d352577012d5035da69bbf49ea0f0df8bb7da;p=git.git diff --git a/t/t2016-checkout-patch.sh b/t/t2016-checkout-patch.sh index 4d1c2e9e0..2144184d7 100755 --- a/t/t2016-checkout-patch.sh +++ b/t/t2016-checkout-patch.sh @@ -66,6 +66,14 @@ test_expect_success 'git checkout -p HEAD^' ' verify_state dir/foo parent parent ' +test_expect_success 'git checkout -p handles deletion' ' + set_state dir/foo work index && + rm dir/foo && + (echo n; echo y) | git checkout -p && + verify_saved_state bar && + verify_state dir/foo index index +' + # The idea in the rest is that bar sorts first, so we always say 'y' # first and if the path limiter fails it'll apply to bar instead of # dir/foo. There's always an extra 'n' to reject edits to dir/foo in