Skip to content

Commit 27b4efe

Browse files
committed
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.
1 parent f7b7eb6 commit 27b4efe

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

‎git/diff.py

+1
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ def _index_from_patch_format(cls, repo, stream):
302302
diff_header = cls.re_header.match
303303
for diff in ('\n' + text).split('\ndiff --git')[1:]:
304304
header = diff_header(diff)
305+
assert header is not None, "Failed to parse diff header from " % diff
305306

306307
a_path, b_path, similarity_index, rename_from, rename_to, \
307308
old_mode, new_mode, new_file_mode, deleted_file_mode, \

‎git/remote.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def exists(self):
404404
self.config_reader.get('url')
405405
return True
406406
except cp.NoOptionError:
407-
# we have the section at least ...
407+
# we have the section at least ...
408408
return True
409409
except cp.NoSectionError:
410410
return False

‎git/test/test_diff.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_diff_interface(self):
8080
for other in (None, commit.Index, commit.parents[0]):
8181
for paths in (None, "CHANGES", ("CHANGES", "lib")):
8282
for create_patch in range(2):
83-
diff_index = diff_item.diff(other, paths, create_patch)
83+
diff_index = diff_item.diff(other=other, paths=paths, create_patch=create_patch)
8484
assert isinstance(diff_index, DiffIndex)
8585

8686
if diff_index:

‎setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def _stamp_version(filename):
9797
# "Development Status :: 1 - Planning",
9898
# "Development Status :: 2 - Pre-Alpha",
9999
# "Development Status :: 3 - Alpha",
100-
"Development Status :: 4 - Beta",
101-
# "Development Status :: 5 - Production/Stable",
100+
# "Development Status :: 4 - Beta",
101+
"Development Status :: 5 - Production/Stable",
102102
# "Development Status :: 6 - Mature",
103103
# "Development Status :: 7 - Inactive",
104104
"Environment :: Console",

0 commit comments

Comments
 (0)