3 from git_python
import Git
5 def branchContains(branch
, commit
):
6 """Returns whether the specified branch contains the specified commit.
13 Whether the branch contains the commit.
17 arg
= branch
+ ".." + commit
18 result
= git
.rev_list(arg
)
21 # If there is a difference between these sets, the commit is not in the branch
24 # There is no difference between the two, thus the branch contains the commit