Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

formally supported method to iterate through all commits #1424

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
fche opened this issue Apr 7, 2022 · 0 comments
Closed

formally supported method to iterate through all commits #1424

fche opened this issue Apr 7, 2022 · 0 comments

Comments

@fche
Copy link

fche commented Apr 7, 2022

Repo.iter_items / iter_commits normally limits itself to parents of HEAD.
However, if a GitPython program wants to iterate through all commits in a git repo, it can use a hack like this:

   r = git.Repo('/path')
   for commit in r.iter_commits('--all'):
        pass

expecting the "--all" flag to be passed down to "git rev-list", and thence back to the python code. It would be nice if there were a more natural interface to expose this search, one that could also work with GitDB.

@gitpython-developers gitpython-developers locked and limited conversation to collaborators Apr 8, 2022
@Byron Byron converted this issue into discussion #1425 Apr 8, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Development

No branches or pull requests

1 participant