Ggit.Mailmap

g GObject.Object GObject.Object Ggit.ObjectFactoryBase Ggit.ObjectFactoryBase GObject.Object->Ggit.ObjectFactoryBase Ggit.Mailmap Ggit.Mailmap Ggit.Native Ggit.Native Ggit.Native->Ggit.Mailmap Ggit.ObjectFactoryBase->Ggit.Native

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_from_repository (repository)

add_entry (real_name, real_email, replace_name, replace_email)

resolve (replace_name, replace_email)

resolve_signature (signature)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Ggit.Native (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Ggit.Mailmap(**kwargs)
Bases:

Ggit.Native

Abstract:

No

Structure:

Ggit.MailmapClass

Represents a mailmap.

classmethod new()
Raises:

GLib.Error

Returns:

a newly allocated Ggit.Mailmap or None.

Return type:

Ggit.Mailmap or None

Creates a new Ggit.Mailmap.

classmethod new_from_repository(repository)
Parameters:

repository (Ggit.Repository) – a Ggit.Repository.

Raises:

GLib.Error

Returns:

a newly allocated Ggit.Mailmap or None.

Return type:

Ggit.Mailmap or None

Creates a new Ggit.Mailmap and loads mailmap files according to the configuration of repository.

add_entry(real_name, real_email, replace_name, replace_email)
Parameters:
  • real_name (str or None) – the real name of the person.

  • real_email (str or None) – the real email of the person.

  • replace_name (str or None) – the name to replace.

  • replace_email (str) – the email to replace.

Raises:

GLib.Error

Adds a new entry to self, replacing replace_name and replace_email with real_name and real_email respectively. If replace_name is None, it is ignored during matching. If either real_name or real_email is None, the respective field is not replaced.

resolve(replace_name, replace_email)
Parameters:
  • replace_name (str) – the name to replace.

  • replace_email (str) – the email to replace.

Raises:

GLib.Error

Returns:

real_name:

the real name of the person.

real_email:

the real email of the person.

Return type:

(real_name: str, real_email: str)

Resolves replace_name and replace_email to real_name and real_email. If self is None, no substitution is performed.

resolve_signature(signature)
Parameters:

signature (Ggit.Signature) – the commit signature as recorded.

Raises:

GLib.Error

Returns:

The corrected signature or None.

Return type:

Ggit.Signature or None

Resolves signature to use the real name and email according to self. If self is None, no substitution is performed, but a new signature is still allocated and returned.