author | Jonathan Nieder <jrnieder@gmail.com> | |
Wed, 29 Sep 2010 21:41:08 +0000 (16:41 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 10 Nov 2010 16:42:40 +0000 (08:42 -0800) | ||
commit | 2d502e1f378a39ef375d6d5c1b3312d286ed2524 | |
tree | ed9fa8c801dd2c06b0b3bb67818ea98e6ed1e1a0 | tree | snapshot |
parent | a1980c4efcfea516e2ba442bf7e56a39d9a7933f | commit | diff |
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>
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>
builtin/apply.c | diff | blob | history | |
t/t4135-apply-weird-filenames.sh | diff | blob | history | |
t/t4135/damaged-tz.diff | [new file with mode: 0644] | blob |
t/t4135/funny-tz.diff | [new file with mode: 0644] | blob |