from commitBody import CommitBody from commitTag import CommitTag class Commit: def __init__(self, rawCommit): self.body = CommitBody(rawCommit.body) self.tag = CommitTag(rawCommit.tag) self.hash = rawCommit.hash def appendShortHash(self): """return the first digits from the hash as string""" return " (" + self.hash[:6] + ")"