# `gbp.git.commit.GitCommit(object)` class documentation

Part of `gbp.git.commit` (View In Hierarchy)

A git commit

Static Method | is_sha1 | Is value a valid 40 digit SHA1?

@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 | the value to check (type: `str`)
Returns | `True` if value is a 40 digit SHA1, `False` otherwise. (type: `bool`)