◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
2 changes: 1 addition & 1 deletion git/objects/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def _iter_from_process_or_stream(cls, repo, proc_or_stream):
# END handle extra info

assert len(hexsha) == 40, "Invalid line: %s" % hexsha
yield Commit(repo, hex_to_bin(hexsha))
# END for each line in stream
# TODO: Review this - it seems process handling got a bit out of control
# due to many developers trying to fix the open file handles issue
Expand Down
7 changes: 7 additions & 0 deletions test/test_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ def test_iteration(self):
less_ltd_commits = list(Commit.iter_items(self.rorepo, 'master', paths=('CHANGES', 'AUTHORS')))
assert len(ltd_commits) < len(less_ltd_commits)

def test_iter_items(self):
# pretty not allowed
self.assertRaises(ValueError, Commit.iter_items, self.rorepo, 'master', pretty="raw")
Expand Down
Toggle all file notes Toggle all file annotations