diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-08 10:14:15 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-08 10:14:15 +0100 |
commit | 27b4efed7a435153f18598796473b3fba06c513d (patch) | |
tree | 08d2917a3632aca30813cd90c0f6d8b8897e5634 | |
parent | f7b7eb6245e7d7c4535975268a9be936e2c59dc8 (diff) | |
download | gitpython-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.
-rw-r--r-- | git/diff.py | 1 | ||||
-rw-r--r-- | git/remote.py | 2 | ||||
-rw-r--r-- | git/test/test_diff.py | 2 | ||||
-rwxr-xr-x | setup.py | 4 |
4 files changed, 5 insertions, 4 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, \ diff --git a/git/remote.py b/git/remote.py index deddd1f4..ce0ed363 100644 --- a/git/remote.py +++ b/git/remote.py @@ -404,7 +404,7 @@ class Remote(LazyMixin, Iterable): self.config_reader.get('url') return True except cp.NoOptionError: - # we have the section at least ... + # we have the section at least ... return True except cp.NoSectionError: return False diff --git a/git/test/test_diff.py b/git/test/test_diff.py index 3453f6a8..c5183089 100644 --- a/git/test/test_diff.py +++ b/git/test/test_diff.py @@ -80,7 +80,7 @@ class TestDiff(TestBase): for other in (None, commit.Index, commit.parents[0]): for paths in (None, "CHANGES", ("CHANGES", "lib")): for create_patch in range(2): - diff_index = diff_item.diff(other, paths, create_patch) + diff_index = diff_item.diff(other=other, paths=paths, create_patch=create_patch) assert isinstance(diff_index, DiffIndex) if diff_index: @@ -97,8 +97,8 @@ GitPython is a python library used to interact with Git repositories""", # "Development Status :: 1 - Planning", # "Development Status :: 2 - Pre-Alpha", # "Development Status :: 3 - Alpha", - "Development Status :: 4 - Beta", - # "Development Status :: 5 - Production/Stable", + # "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", # "Development Status :: 6 - Mature", # "Development Status :: 7 - Inactive", "Environment :: Console", |