Skip to content

git.iter_commits() cannot specify both a branch and commits between two revisions("reva....revb") #1177

Answered by Byron
socratesgorilla asked this question in Q&A
Discussion options

You must be logged in to vote

The refspec HEAD~20..HEAD means all commits between the 20th ancestor of the currently checked out one (HEAD~20), and the currently checked out one (HEAD).
HEAD may as well be branch, meaning that branch1..branch2 will work similarly.

Now it would be interesting to find out what happens if branch1 is not an ancestor of branch2.

As this capability is documented, too, I don't see a need to keep this open any longer. If there is trouble with this nonetheless, please let me know in the comments.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1111 on February 26, 2021 11:18.