Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9de6450

Browse files
authored
Merge pull request#1119 from yvolchkov/master
Fix inheritance issue at commit.iter_items
2 parents3c19a6e +af86f05 commit9de6450

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎git/objects/commit.py

Lines 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
assertlen(hexsha)==40,"Invalid line: %s"%hexsha
272-
yieldCommit(repo,hex_to_bin(hexsha))
272+
yieldcls(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

‎test/test_commit.py

Lines 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
assertlen(ltd_commits)<len(less_ltd_commits)
201201

202+
classChild(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+
asserttype(child_commits[0])==Child
208+
202209
deftest_iter_items(self):
203210
# pretty not allowed
204211
self.assertRaises(ValueError,Commit.iter_items,self.rorepo,'master',pretty="raw")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp