A git commit

Class Variable sha1_re Undocumented
Static Method is_sha1 Is value a valid 40 digit SHA1?
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
Parametersvaluethe value to check (type: str)
ReturnsTrue if value is a 40 digit SHA1, False otherwise. (type: bool)
API Documentation for git-buildpackage, generated by pydoctor at 2021-02-01 08:15:22.