diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-02-28 21:37:55 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-28 21:37:55 (GMT) |
commit | 177bd65cf8601216e906ad56ceb6a46f57df22fa (patch) | |
tree | b7eb2ee9a3fe8dced866b236e3031f70ca0d9d55 /t | |
parent | 7676b86ec2a60078ed3eb274d208bf61be3e29a7 (diff) | |
parent | e454ad4becff73588b1b3cc24dba3a0e740c7f7c (diff) | |
download | git-177bd65cf8601216e906ad56ceb6a46f57df22fa.zip git-177bd65cf8601216e906ad56ceb6a46f57df22fa.tar.gz git-177bd65cf8601216e906ad56ceb6a46f57df22fa.tar.bz2 |
Merge branch 'tk/apply-dev-null-verify-name-fix'
Many places in "git apply" knew that "/dev/null" that signals
"there is no such file on this side of the diff" can be followed by
whitespace and garbage when parsing a patch, except for one, which
made an otherwise valid patch (e.g. ones from subversion) rejected.
* tk/apply-dev-null-verify-name-fix:
apply: handle Subversion diffs with /dev/null gracefully
apply: demonstrate a problem applying svn diffs
Diffstat (limited to 't')
-rwxr-xr-x | t/t4135-apply-weird-filenames.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t4135-apply-weird-filenames.sh b/t/t4135-apply-weird-filenames.sh index 27cb000..c7c688f 100755 --- a/t/t4135-apply-weird-filenames.sh +++ b/t/t4135-apply-weird-filenames.sh @@ -89,4 +89,21 @@ test_expect_success 'traditional, whitespace-damaged, colon in timezone' ' test_cmp expected "post image.txt" ' +cat >diff-from-svn <<\EOF +Index: Makefile +=================================================================== +diff --git a/branches/Makefile +deleted file mode 100644 +--- a/branches/Makefile (revision 13) ++++ /dev/null (nonexistent) +@@ +1 0,0 @@ +- +EOF + +test_expect_success 'apply handles a diff generated by Subversion' ' + >Makefile && + git apply -p2 diff-from-svn && + test_path_is_missing Makefile +' + test_done |