class documentation
class GitCommit(object):
A git commit
Is value a valid 40 digit SHA1?
>>> GitCommit.is_sha1('asdf') False >>> GitCommit.is_sha1('deadbeef') False >>> GitCommit.is_sha1('17975594b2d42f2a3d144a9678fdf2c2c1dd96a0') True >>> GitCommit.is_sha1('17975594b2d42f2a3d144a9678fdf2c2c1dd96a0toolong') False
Parameters | |
value:str | the value to check |
Returns | |
bool | True if value is a 40 digit SHA1, False otherwise. |