summaryrefslogtreecommitdiff
path: root/git/diff.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-08 10:14:15 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-08 10:14:15 +0100
commit27b4efed7a435153f18598796473b3fba06c513d (patch)
tree08d2917a3632aca30813cd90c0f6d8b8897e5634 /git/diff.py
parentf7b7eb6245e7d7c4535975268a9be936e2c59dc8 (diff)
downloadgitpython-27b4efed7a435153f18598796473b3fba06c513d.tar.gz
Added assertion to better detect diff issues.
Helps fixing #35 Also, the production status was changed to 'stable', which should have been done much earlier.
Diffstat (limited to 'git/diff.py')
-rw-r--r--git/diff.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/git/diff.py b/git/diff.py
index 3c4e8529..b59c264c 100644
--- a/git/diff.py
+++ b/git/diff.py
@@ -302,6 +302,7 @@ class Diff(object):
diff_header = cls.re_header.match
for diff in ('\n' + text).split('\ndiff --git')[1:]:
header = diff_header(diff)
+ assert header is not None, "Failed to parse diff header from " % diff
a_path, b_path, similarity_index, rename_from, rename_to, \
old_mode, new_mode, new_file_mode, deleted_file_mode, \