Skip to content

Commit 180a502

Browse files
committed
git.commit: Added test to assure we handle the first commit correctly regarding its parents
1 parent a803803 commit 180a502

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/git/index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ def remove(self, items, working_tree=False, **kwargs):
10231023
Returns
10241024
List(path_string, ...) list of paths that have been removed effectively.
10251025
This is interesting to know in case you have provided a directory or
1026-
globs. Paths are relative to the
1026+
globs. Paths are relative to the repository.
10271027
"""
10281028
args = list()
10291029
if not working_tree:

test/git/test_commit.py

+5
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ def test_traversal(self):
8888
# traversal should stop when the beginning is reached
8989
self.failUnlessRaises(StopIteration, first.traverse().next)
9090

91+
# parents of the first commit should be empty ( as the only parent has a null
92+
# sha )
93+
assert len(first.parents) == 0
94+
95+
9196
@patch_object(Git, '_call_process')
9297
def test_rev_list_bisect_all(self, git):
9398
"""

0 commit comments

Comments
 (0)