git.iter_commits() cannot specify both a branch and commits between two revisions("reva....revb") #1177
-
|
What I mean is something identical to the function of, say, This does not work for iter_commits, as rev only takes one argument. If there is a way to do this natively, it is not documented. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Did you try something like |
Beta Was this translation helpful? Give feedback.
-
|
It doesn't let you specify a branch, as far as I can tell. |
Beta Was this translation helpful? Give feedback.
-
|
The refspec Now it would be interesting to find out what happens if 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. |
Beta Was this translation helpful? Give feedback.
The refspec
HEAD~20..HEADmeans all commits between the 20th ancestor of the currently checked out one (HEAD~20), and the currently checked out one (HEAD).HEADmay as well bebranch, meaning thatbranch1..branch2will work similarly.Now it would be interesting to find out what happens if
branch1is not an ancestor ofbranch2.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.