summaryrefslogtreecommitdiff
path: root/lib/git/diff.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-10-15 12:53:14 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-10-15 12:53:14 +0200
commit94029ce1420ced83c3e5dcd181a2280b26574bc9 (patch)
tree5b2f2841597153669c546379291ad8693834800d /lib/git/diff.py
parent13647590f96fb5a22cb60f12c5a70e00065a7f3a (diff)
downloadgitpython-94029ce1420ced83c3e5dcd181a2280b26574bc9.tar.gz
Adjusted regex to support whitespace - it was a little restrictive previously, although there was absolutely no need for that.
See http://byronimo.lighthouseapp.com/projects/51787/tickets/41-diff-regex-lib_git_diffpy-cannot-handle-paths-with-spaces
Diffstat (limited to 'lib/git/diff.py')
-rw-r--r--lib/git/diff.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/git/diff.py b/lib/git/diff.py
index e1749adc..48253c42 100644
--- a/lib/git/diff.py
+++ b/lib/git/diff.py
@@ -175,7 +175,7 @@ class Diff(object):
# precompiled regex
re_header = re.compile(r"""
#^diff[ ]--git
- [ ]a/(?P<a_path>\S+)[ ]b/(?P<b_path>\S+)\n
+ [ ]a/(?P<a_path>.+?)[ ]b/(?P<b_path>.+?)\n
(?:^similarity[ ]index[ ](?P<similarity_index>\d+)%\n
^rename[ ]from[ ](?P<rename_from>\S+)\n
^rename[ ]to[ ](?P<rename_to>\S+)(?:\n|$))?