def revisions(self, path, max_revisions):
    if self.repo.is_dirty():
        raise DirtyGitRepositoryError(self.repo.untracked_files)
    revisions = []
    for commit in self.repo.iter_commits(self.current_branch, max_count=self.config.max_revisions):
        rev = Revision(key=commit.name_rev.split(' ')[0], author_name=commit.author.name, author_email=commit.author.email, revision_date=commit.committed_date, message=commit.message)
        revisions.append(rev)
    return revisions
def revisions(self, path, max_revisions):
    if self.repo.is_dirty():
        raise DirtyGitRepositoryError(self.repo.untracked_files)
    revisions = []
    for commit in self.repo.iter_commits(self.current_branch, max_count=self.config.max_revisions):
        rev = Revision(key=commit.name_rev.split(' ')[0], author_name=commit.author.name, author_email=commit.author.email, revision_date=commit.committed_date, message=commit.message)
        revisions.append(rev)
    return revisions