dulwich.mailmap module

Mailmap file reader.

class dulwich.mailmap.Mailmap(map=None)

Bases: object

Class for accessing a mailmap file.

add_entry(canonical_identity, from_identity=None)

Add an entry to the mail mail.

Any of the fields can be None, but at least one of them needs to be set.

Parameters
  • canonical_identity – The canonical identity (tuple)

  • from_identity – The from identity (tuple)

classmethod from_path(path)
lookup(identity)

Lookup an identity in this mailmail.

dulwich.mailmap.parse_identity(text)
dulwich.mailmap.read_mailmap(f)

Read a mailmap.

Parameters

f – File-like object to read from

Returns: Iterator over

((canonical_name, canonical_email), (from_name, from_email)) tuples