gi-ggit-1.0.14: libgit2-glib bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Ggit.Objects.Mailmap

Description

Represents a mailmap.

Synopsis

Exported types

newtype Mailmap Source #

Memory-managed wrapper type.

Constructors

Mailmap (ManagedPtr Mailmap) 

Instances

Instances details
Eq Mailmap Source # 
Instance details

Defined in GI.Ggit.Objects.Mailmap

Methods

(==) :: Mailmap -> Mailmap -> Bool #

(/=) :: Mailmap -> Mailmap -> Bool #

GObject Mailmap Source # 
Instance details

Defined in GI.Ggit.Objects.Mailmap

ManagedPtrNewtype Mailmap Source # 
Instance details

Defined in GI.Ggit.Objects.Mailmap

Methods

toManagedPtr :: Mailmap -> ManagedPtr Mailmap

TypedObject Mailmap Source # 
Instance details

Defined in GI.Ggit.Objects.Mailmap

Methods

glibType :: IO GType

HasParentTypes Mailmap Source # 
Instance details

Defined in GI.Ggit.Objects.Mailmap

IsGValue (Maybe Mailmap) Source #

Convert Mailmap to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Ggit.Objects.Mailmap

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Mailmap -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Mailmap)

type ParentTypes Mailmap Source # 
Instance details

Defined in GI.Ggit.Objects.Mailmap

type ParentTypes Mailmap = '[Native, ObjectFactoryBase, Object]

class (GObject o, IsDescendantOf Mailmap o) => IsMailmap o Source #

Type class for types which can be safely cast to Mailmap, for instance with toMailmap.

Instances

Instances details
(GObject o, IsDescendantOf Mailmap o) => IsMailmap o Source # 
Instance details

Defined in GI.Ggit.Objects.Mailmap

toMailmap :: (MonadIO m, IsMailmap o) => o -> m Mailmap Source #

Cast to Mailmap, for types for which this is known to be safe. For general casts, use castTo.

Methods

addEntry

mailmapAddEntry Source #

Arguments

:: (HasCallStack, MonadIO m, IsMailmap a) 
=> a

mailmap: the mailmap to add the entry in.

-> Maybe Text

realName: the real name of the person.

-> Maybe Text

realEmail: the real email of the person.

-> Maybe Text

replaceName: the name to replace.

-> Text

replaceEmail: the email to replace.

-> m ()

(Can throw GError)

Adds a new entry to mailmap, replacing replaceName and replaceEmail with realName and realEmail respectively. If replaceName is Nothing, it is ignored during matching. If either realName or realEmail is Nothing, the respective field is not replaced.

new

mailmapNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m (Maybe Mailmap)

Returns: a newly allocated Mailmap or Nothing. (Can throw GError)

Creates a new Mailmap.

newFromRepository

mailmapNewFromRepository Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepository a) 
=> a

repository: a Repository.

-> m (Maybe Mailmap)

Returns: a newly allocated Mailmap or Nothing. (Can throw GError)

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

resolve

mailmapResolve Source #

Arguments

:: (HasCallStack, MonadIO m, IsMailmap a) 
=> a

mailmap: the mailmap to search for replacements in.

-> Text

replaceName: the name to replace.

-> Text

replaceEmail: the email to replace.

-> m (Text, Text)

(Can throw GError)

Resolves replaceName and replaceEmail to realName and realEmail. If mailmap is NULL, no substitution is performed.

resolveSignature

mailmapResolveSignature Source #

Arguments

:: (HasCallStack, MonadIO m, IsMailmap a, IsSignature b) 
=> a

mailmap: the mailmap to resolve names and emails with.

-> b

signature: the commit signature as recorded.

-> m (Maybe Signature)

Returns: The corrected signature or Nothing. (Can throw GError)

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