repomatic.mailmap moduleΒΆ
Group the contributor identities of the git history into a .mailmap.
Backs the sync-mailmap command: parses the existing mappings as the
reference for identities already grouped, reads every author and committer the
history holds, and appends whatever is not covered yet.
- repomatic.mailmap.MAILMAP_PATH = PosixPath('.mailmap')ΒΆ
Canonical path to the
.mailmapfile in the repository root.
- class repomatic.mailmap.Record(canonical='', aliases=set(), pre_comment='')[source]ΒΆ
Bases:
objectA mailmap identity mapping entry.
- property identities: frozenset[str]ΒΆ
Every identity of the record, lowercased.
Identity matching is case insensitive, per the mailmap syntax.
- class repomatic.mailmap.Mailmap[source]ΒΆ
Bases:
objectHelpers to manipulate
.mailmapfiles..mailmapfile format is documented on Git website.Initialize the mailmap with an empty list of records.
- parse(content)[source]ΒΆ
Parse mailmap content and add it to the current list of records.
Each non-empty, non-comment line is considered a mapping entry.
The preceding lines of a mapping entry are kept attached to it as pre-comments, so the layout will be preserved on rendering, during which records are sorted.
- Return type:
- update_from_git()[source]ΒΆ
Add to internal records all missing contributors found in commit history.
No normalization happens: all variations of authors and committers strings attached to all commits are considered. A contributor already registered, as a canonical identity or as an alias, is not added again.
- Raises:
RuntimeError β When git fails, carrying its stderr.
- Return type: