Skip to content
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

list all commits between two commits? #441

Open
tdhock opened this issue Jul 13, 2022 · 2 comments
Open

list all commits between two commits? #441

tdhock opened this issue Jul 13, 2022 · 2 comments

Comments

@tdhock
Copy link

tdhock commented Jul 13, 2022

Hi! I was wondering if there is some way, given two commits A and B (sha or tag), to list all commits between them, similar to the A..B and A...B syntax on command line? https://stackoverflow.com/questions/54989224/list-of-all-commits-between-2-commits#54992168
Related, is there some way to do something analogous to git bisect in git2r?
I looked at docs and list of functions provided but I did not see any mention of either.
Thanks.

@stewid
Copy link
Member

stewid commented Jul 13, 2022

Hi,
Unfortunately, it is not possible to bisect or list all commits between two commits using git2r. Maybe it would be possible to implement the list functionality in git2r using the git_revwalk_push_range functionality in libgit2 (https://libgit2.org/libgit2/#HEAD/group/revwalk/git_revwalk_push_range)? Currently, git2r uses the git_revwalk_push function

error = git_revwalk_push(walker, &oid);
to initiate the walk.

@tdhock
Copy link
Author

tdhock commented Jul 13, 2022

OK, thanks for the clarification. If you can make one, it would be useful to have a wiki page or FAQ in the docs which explicitly lists features like this which are present in the command line tool but not present (yet) in git2r? (for users like me which assume naively that git2r offers basically the same functionality as the command line git program)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants