diff options
author | JJ Graham <thetwoj@gmail.com> | 2019-10-21 17:16:59 -0500 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2019-10-22 12:39:27 +0200 |
commit | 14d7034adc2698c1e7dd13570c23d217c753e932 (patch) | |
tree | 6a8f1f2020c40955bd9c7a4e4ac39b950a41034a /git/diff.py | |
parent | 44496c6370d8f9b15b953a88b33816a92096ce4d (diff) | |
download | gitpython-14d7034adc2698c1e7dd13570c23d217c753e932.tar.gz |
Fix #852 by tweaking regex to handle -R option to git diff
Diffstat (limited to 'git/diff.py')
-rw-r--r-- | git/diff.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git/diff.py b/git/diff.py index 3dbe0866..a0076f0c 100644 --- a/git/diff.py +++ b/git/diff.py @@ -237,7 +237,7 @@ class Diff(object): # precompiled regex re_header = re.compile(br""" ^diff[ ]--git - [ ](?P<a_path_fallback>"?a/.+?"?)[ ](?P<b_path_fallback>"?b/.+?"?)\n + [ ](?P<a_path_fallback>"?[ab]/.+?"?)[ ](?P<b_path_fallback>"?[ab]/.+?"?)\n (?:^old[ ]mode[ ](?P<old_mode>\d+)\n ^new[ ]mode[ ](?P<new_mode>\d+)(?:\n|$))? (?:^similarity[ ]index[ ]\d+%\n |