(cls, sha1)
return out
Uniquely abbreviates the given SHA1.
Uniquely abbreviates the given SHA1.
Uniquely abbreviates the given SHA1 .
def abbreviate_sha1(cls, sha1):
        """Uniquely abbreviates the given SHA1."""

        # For now we invoke git-rev-parse(1), but hopefully eventually
        # we will be able to do this via pygit2.
        cmd = ['git', 'rev-parse', '--short', sha1]
        # cls.logger.debug(" ".join(cmd))
        out = subprocess.check_output(cmd, universal_newlines=True).strip()
        # cls.logger.debug(out)
        return out
def abbreviate_sha1 ( cls , sha1 ) : # For now we invoke git-rev-parse(1), but hopefully eventually # we will be able to do this via pygit2. cmd = [ 'git' , 'rev-parse' , '--short' , sha1 ] # cls.logger.debug(" ".join(cmd)) out = subprocess . check_output ( cmd , universal_newlines = True ) . strip ( ) # cls.logger.debug(out) return out