diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-02-17 21:07:58 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-02-18 14:19:18 +0100 |
commit | 180a5029bc3a2f0c1023c2c63b552766dc524c41 (patch) | |
tree | 27ea4cfbcd99a1f14e565cf65bc0b03732250937 | |
parent | a803803f40163c20594f12a5a0a536598daec458 (diff) | |
download | gitpython-180a5029bc3a2f0c1023c2c63b552766dc524c41.tar.gz |
git.commit: Added test to assure we handle the first commit correctly regarding its parents
-rw-r--r-- | lib/git/index.py | 2 | ||||
-rw-r--r-- | test/git/test_commit.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/git/index.py b/lib/git/index.py index 96d42eaf..3bf1fac9 100644 --- a/lib/git/index.py +++ b/lib/git/index.py @@ -1023,7 +1023,7 @@ class IndexFile(LazyMixin, diff.Diffable): Returns List(path_string, ...) list of paths that have been removed effectively. This is interesting to know in case you have provided a directory or - globs. Paths are relative to the + globs. Paths are relative to the repository. """ args = list() if not working_tree: diff --git a/test/git/test_commit.py b/test/git/test_commit.py index 570ea65e..1e0338d6 100644 --- a/test/git/test_commit.py +++ b/test/git/test_commit.py @@ -88,6 +88,11 @@ class TestCommit(TestBase): # traversal should stop when the beginning is reached self.failUnlessRaises(StopIteration, first.traverse().next) + # parents of the first commit should be empty ( as the only parent has a null + # sha ) + assert len(first.parents) == 0 + + @patch_object(Git, '_call_process') def test_rev_list_bisect_all(self, git): """ |