GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #1119 from yvolchkov/master · gitpython-developers/GitPython@9de6450

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • git/objects
    • commit.py
  • test
    • test_commit.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/objects/commit.py‎

Copy file name to clipboardExpand all lines: git/objects/commit.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def _iter_from_process_or_stream(cls, repo, proc_or_stream):
269269
# END handle extra info
270270

271271
assert len(hexsha) == 40, "Invalid line: %s" % hexsha
272-
yield Commit(repo, hex_to_bin(hexsha))
272+
yield cls(repo, hex_to_bin(hexsha))
273273
# END for each line in stream
274274
# TODO: Review this - it seems process handling got a bit out of control
275275
# due to many developers trying to fix the open file handles issue
Collapse file

‎test/test_commit.py‎

Copy file name to clipboardExpand all lines: test/test_commit.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,13 @@ def test_iteration(self):
199199
less_ltd_commits = list(Commit.iter_items(self.rorepo, 'master', paths=('CHANGES', 'AUTHORS')))
200200
assert len(ltd_commits) < len(less_ltd_commits)
201201

202+
class Child(Commit):
203+
def __init__(self, *args, **kwargs):
204+
super(Child, self).__init__(*args, **kwargs)
205+
206+
child_commits = list(Child.iter_items(self.rorepo, 'master', paths=('CHANGES', 'AUTHORS')))
207+
assert type(child_commits[0]) == Child
208+
202209
def test_iter_items(self):
203210
# pretty not allowed
204211
self.assertRaises(ValueError, Commit.iter_items, self.rorepo, 'master', pretty="raw")

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.