Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-02-15 03:29:27 +0300
committerJunio C Hamano <gitster@pobox.com>2018-02-15 22:09:01 +0300
commitf16ef7bd4c37fba8c030b87610f646a1fce5d52d (patch)
treecda337843542bdeb13cb997b040a185ba87b28e5 /t/t4135-apply-weird-filenames.sh
parentfc849d8d6b90e5c1e0c37bc0d60dd92b2fe7347f (diff)
apply: demonstrate a problem applying svn diffs
Subversion generates diffs that contain funny ---/+++ lines containing more than just the file names. Example: --- a/trunk/README (revision 4711) +++ /dev/null (nonexistent) Let's add a test case demonstrating that apply cannot handle the /dev/null line (although it can handle the trunk/README line just fine). Reported in https://github.com/git-for-windows/git/issues/1489 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4135-apply-weird-filenames.sh')
-rwxr-xr-xt/t4135-apply-weird-filenames.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t4135-apply-weird-filenames.sh b/t/t4135-apply-weird-filenames.sh
index 27cb0009fb..b14b808578 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_failure 'apply handles a diff generated by Subversion' '
+ >Makefile &&
+ git apply -p2 diff-from-svn &&
+ test_path_is_missing Makefile
+'
+
test_done