def extra_footers(self): """Get any extra footers for this commit as an OrderedDict of {footer: [values]}. Extra footers are stored as git-notes on the refs/notes/extra_footers ref. """ footer_lines = [] raw = self.notes('refs/notes/extra_footers') if raw is not None: _, footer_lines = CommitData.parse_raw_message( [''] + raw.rstrip('\n').splitlines()) return CommitData.frozen_dict_from_kv_pairs(footer_lines)
def extra_footers(self): """Get any extra footers for this commit as an OrderedDict of {footer: [values]}. Extra footers are stored as git-notes on the refs/notes/extra_footers ref. """ footer_lines = [] raw = self.notes('refs/notes/extra_footers') if raw is not None: _, footer_lines = CommitData.parse_raw_message( [''] + raw.rstrip('\n').splitlines() ) return CommitData.frozen_dict_from_kv_pairs(footer_lines)
def data(self): """Get a structured data representation of this commit.""" try: raw_data = self.repo.run('cat-file', 'commit', self.hsh) except CalledProcessError: return INVALID return CommitData.from_raw(raw_data)