Skip to content

Use of iter_commits() in tutorial instead of iter_items() #707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jnareb opened this issue Dec 5, 2017 · 1 comment
Closed

Use of iter_commits() in tutorial instead of iter_items() #707

jnareb opened this issue Dec 5, 2017 · 1 comment

Comments

@jnareb
Copy link

jnareb commented Dec 5, 2017

"The Commit object" section in "GitPython Tutorial" of the documentation mentions iter_commits() class method, which does not exist, instead of correct name iter_items():

        fifty_first_commits = list(repo.iter_commits('master', max_count=50))
        assert len(fifty_first_commits) == 50
        # this will return commits 21-30 from the commit list as traversed backwards master
        ten_commits_past_twenty = list(repo.iter_commits('master', max_count=10, skip=20))
        assert len(ten_commits_past_twenty) == 10
        assert fifty_first_commits[20:30] == ten_commits_past_twenty
@jnareb
Copy link
Author

jnareb commented Dec 5, 2017

Sorry, that actually works, my mistake

@jnareb jnareb closed this as completed Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant