summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-29 19:38:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-29 19:38:22 (GMT)
commit689204ca8862a25be7bd7f91a42fbdf46cfb2a56 (patch)
tree3e889b66f7d0b4d43ceb072e17ac527807d5ac67 /t
parent0324b6f035a19f0098c321a7e6e17c04e9405be2 (diff)
parent2bd69b9024c8c7c1b77060e3ed996c74b4775b01 (diff)
downloadgit-689204ca8862a25be7bd7f91a42fbdf46cfb2a56.zip
git-689204ca8862a25be7bd7f91a42fbdf46cfb2a56.tar.gz
git-689204ca8862a25be7bd7f91a42fbdf46cfb2a56.tar.bz2
Merge branch 'pw/add-p-recount' into maint
"git checkout -p" needs to selectively apply a patch in reverse, which did not work well. * pw/add-p-recount: add -p: fix checkout -p with pathological context
Diffstat (limited to 't')
-rwxr-xr-xt/t3701-add-interactive.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 65dfbc0..69991a3 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -639,4 +639,12 @@ test_expect_success 'add -p patch editing works with pathological context lines'
test_cmp expected-2 actual
'
+test_expect_success 'checkout -p works with pathological context lines' '
+ test_write_lines a a a a a a >a &&
+ git add a &&
+ test_write_lines a b a b a b a b a b a > a&&
+ test_write_lines s n n y q | git checkout -p &&
+ test_write_lines a b a b a a b a b a >expect &&
+ test_cmp expect a
+'
test_done