diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-09 15:25:37 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-09 15:25:37 -0700 |
commit | 1b074e15d0f976be2bc14f9528874a841c055213 (patch) | |
tree | a71a012782c2c47ec352f6ab64423a8a91a7f5b4 /t | |
parent | Merge branch 'ds/close-object-store' (diff) | |
parent | add -p: fix checkout -p with pathological context (diff) | |
download | tgif-1b074e15d0f976be2bc14f9528874a841c055213.tar.xz |
Merge branch 'pw/add-p-recount'
"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-x | t/t3701-add-interactive.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index 65dfbc033a..69991a3168 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 |