class documentation

class GitCommit(object):

View In Hierarchy

A git commit

Static Method is_sha1 Is value a valid 40 digit SHA1?
Class Variable sha1_re Undocumented
@staticmethod
def is_sha1(value):

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:strthe value to check
Returns
boolTrue if value is a 40 digit SHA1, False otherwise.
sha1_re =

Undocumented