summaryrefslogtreecommitdiff
path: root/t/t4135
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-09-29 21:41:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-11-10 16:42:40 (GMT)
commit2d502e1f378a39ef375d6d5c1b3312d286ed2524 (patch)
treeed9fa8c801dd2c06b0b3bb67818ea98e6ed1e1a0 /t/t4135
parenta1980c4efcfea516e2ba442bf7e56a39d9a7933f (diff)
downloadgit-2d502e1f378a39ef375d6d5c1b3312d286ed2524.zip
git-2d502e1f378a39ef375d6d5c1b3312d286ed2524.tar.gz
git-2d502e1f378a39ef375d6d5c1b3312d286ed2524.tar.bz2
apply: handle patches with funny filename and colon in timezone
Some patches have a timezone formatted like '-08:00' instead of '-0800' in their ---/+++ lines (e.g. http://lwn.net/Articles/131729/). Take this into account when searching for the start of the timezone (which is the end of the filename). This does not actually affect the outcome of patching unless (1) a file being patched has a non-' ' whitespace character (e.g., tab) in its filename, or (2) the patch is whitespace-damaged, so the tab between filename and timestamp has been replaced with spaces. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4135')
-rw-r--r--t/t4135/damaged-tz.diff5
-rw-r--r--t/t4135/funny-tz.diff5
2 files changed, 10 insertions, 0 deletions
diff --git a/t/t4135/damaged-tz.diff b/t/t4135/damaged-tz.diff
new file mode 100644
index 0000000..07aaf08
--- /dev/null
+++ b/t/t4135/damaged-tz.diff
@@ -0,0 +1,5 @@
+diff -urN -X /usr/people/jes/exclude-linux linux-2.6.12-rc2-mm3-vanilla/post image.txt linux-2.6.12-rc2-mm3/post image.txt
+--- linux-2.6.12-rc2-mm3-vanilla/post image.txt 1969-12-31 16:00:00 -08:00
++++ linux-2.6.12-rc2-mm3/post image.txt 2005-04-12 02:14:06 -07:00
+@@ -0,0 +1 @@
++postimage
diff --git a/t/t4135/funny-tz.diff b/t/t4135/funny-tz.diff
new file mode 100644
index 0000000..998e3a8
--- /dev/null
+++ b/t/t4135/funny-tz.diff
@@ -0,0 +1,5 @@
+diff -urN -X /usr/people/jes/exclude-linux linux-2.6.12-rc2-mm3-vanilla/post image.txt linux-2.6.12-rc2-mm3/post image.txt
+--- linux-2.6.12-rc2-mm3-vanilla/post image.txt 1969-12-31 16:00:00 -08:00
++++ linux-2.6.12-rc2-mm3/post image.txt 2005-04-12 02:14:06 -07:00
+@@ -0,0 +1 @@
++postimage