Skip to content

Branch latest SHA and differs_from keyword argument #1149

Answered by sigmavirus24
kamilturek asked this question in Q&A
Discussion options

You must be logged in to vote

It's supported and intended to be documented (as there's a docstring):

def latest_sha(self, differs_from=""):

differs_from is for a very specific use-case. Let's say that you have a (very very very) long running process and you've retrieved that Branch object already way in the past. You can call b.differs_from(b.commit.sha) to determine if the branch on GitHub has new commits or has been changed.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sigmavirus24
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 #1125 on April 26, 2023 00:44.