gi-ggit-1.0.8: libgit2-glib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Ggit.Objects.Diff

Contents

Description

Represents a diff list.

Synopsis

Exported types

newtype Diff Source #

Memory-managed wrapper type.

Constructors

Diff (ManagedPtr Diff) 
Instances
Eq Diff Source # 
Instance details

Defined in GI.Ggit.Objects.Diff

Methods

(==) :: Diff -> Diff -> Bool

(/=) :: Diff -> Diff -> Bool

GObject Diff Source # 
Instance details

Defined in GI.Ggit.Objects.Diff

Methods

gobjectType :: IO GType

IsGValue Diff Source #

Convert Diff to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Ggit.Objects.Diff

Methods

toGValue :: Diff -> IO GValue

fromGValue :: GValue -> IO Diff

HasParentTypes Diff Source # 
Instance details

Defined in GI.Ggit.Objects.Diff

type ParentTypes Diff Source # 
Instance details

Defined in GI.Ggit.Objects.Diff

type ParentTypes Diff = Native ': (ObjectFactoryBase ': (Object ': ([] :: [Type])))

class (GObject o, IsDescendantOf Diff o) => IsDiff o Source #

Type class for types which can be safely cast to Diff, for instance with toDiff.

Instances
(GObject o, IsDescendantOf Diff o) => IsDiff o Source # 
Instance details

Defined in GI.Ggit.Objects.Diff

toDiff :: (MonadIO m, IsDiff o) => o -> m Diff Source #

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

noDiff :: Maybe Diff Source #

A convenience alias for Nothing :: Maybe Diff.

Methods

Overloaded methods

findSimilar

diffFindSimilar Source #

Arguments

:: (HasCallStack, MonadIO m, IsDiff a, IsDiffFindOptions b) 
=> a

diff: a tDiff.

-> Maybe b

options: a tDiffFindOptions or Nothing.

-> m ()

(Can throw GError)

Transform diff marking file renames, copies, etc.. If options is set to Nothing, then the default options will be used.

formatEmail

diffFormatEmail Source #

Arguments

:: (HasCallStack, MonadIO m, IsDiff a, IsDiffFormatEmailOptions b) 
=> a

diff: a tDiff.

-> b

options: a tDiffFormatEmailOptions.

-> m (Maybe Text)

Returns: the patch or Nothing if an error occurred. (Can throw GError)

Create an e-mail ready patch from a diff.

getDelta

diffGetDelta Source #

Arguments

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

diff: a tDiff.

-> Word64

index: the index.

-> m (Maybe DiffDelta)

Returns: a tDiffDelta or Nothing.

Get the delta at the specified index.

getNumDeltas

diffGetNumDeltas Source #

Arguments

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

diff: a tDiff.

-> m Word64

Returns: the number of deltas.

Get the number of deltas in the diff.

merge

diffMerge Source #

Arguments

:: (HasCallStack, MonadIO m, IsDiff a, IsDiff b) 
=> a

onto: the tDiff to merge into.

-> b

from: the tDiff to merge.

-> m ()

(Can throw GError)

Merges from into onto unless error is set.

newBuffers

diffNewBuffers Source #

Arguments

:: (HasCallStack, MonadIO m, IsDiffOptions a) 
=> Maybe ByteString

buffer1: a buffer to diff from.

-> Maybe Text

buffer1AsPath: treat buffer1 as if it had this filename, or Nothing,

-> Maybe ByteString

buffer2: a buffer to diff to.

-> Maybe Text

buffer2AsPath: treat buffer2 as if it had this filename, or Nothing,

-> Maybe a

diffOptions: a tDiffOptions, or Nothing.

-> m (Maybe Diff)

Returns: a newly allocated tDiff if there was no error, Nothing otherwise. (Can throw GError)

Same as diffBlobs but using a buffers. Creates a tDiff which compares buffer1 and buffer2.

If diffOptions is Nothing then the defaults specified in diffOptionsNew are used.

newIndexToWorkdir

diffNewIndexToWorkdir Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepository a, IsIndex b, IsDiffOptions c) 
=> a

repository: a tRepository.

-> Maybe b

index: a tIndex, or Nothing.

-> Maybe c

diffOptions: a tDiffOptions, or Nothing.

-> m (Maybe Diff)

Returns: a newly allocated tDiff if there was no error, Nothing otherwise. (Can throw GError)

Creates a tDiff which compares the working directory and the index.

If index is Nothing then repository index is used. If diffOptions is Nothing then the defaults specified in diffOptionsNew are used.

newTreeToIndex

diffNewTreeToIndex Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsIndex c, IsDiffOptions d) 
=> a

repository: a tRepository.

-> Maybe b

oldTree: a tTree to diff from.

-> Maybe c

index: a tIndex, or Nothing.

-> Maybe d

diffOptions: a tDiffOptions, or Nothing.

-> m (Maybe Diff)

Returns: a newly allocated tDiff if there was no error, Nothing otherwise. (Can throw GError)

Creates a tDiff which compares oldTree and the index.

If index is Nothing then repository index is used. If diffOptions is Nothing then the defaults specified in diffOptionsNew are used.

newTreeToTree

diffNewTreeToTree Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsTree c, IsDiffOptions d) 
=> a

repository: a tRepository.

-> Maybe b

oldTree: a tTree to diff from.

-> Maybe c

newTree: a tTree to diff to.

-> Maybe d

diffOptions: a tDiffOptions, or Nothing.

-> m (Maybe Diff)

Returns: a newly allocated tDiff if there was no error, Nothing otherwise. (Can throw GError)

Creates a tDiff which compares oldTree and newTree.

If diffOptions is Nothing then the defaults specified in diffOptionsNew are used.

newTreeToWorkdir

diffNewTreeToWorkdir Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsDiffOptions c) 
=> a

repository: a tRepository.

-> Maybe b

oldTree: a tTree to diff from.

-> Maybe c

diffOptions: a tDiffOptions, or Nothing.

-> m (Maybe Diff)

Returns: a newly allocated tDiff if there was no error, Nothing otherwise. (Can throw GError)

Creates a tDiff which compares the working directory and oldTree.

If diffOptions is Nothing then the defaults specified in diffOptionsNew are used.

print

diffPrint Source #

Arguments

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

diff: a tDiff.

-> DiffFormatType

type: a tDiffFormatType.

-> DiffLineCallback

printCb: a tDiffLineCallback.

-> m ()

(Can throw GError)

Iterates over diff generating text output like "git diff".

Properties

repository

No description available in the introspection data.

constructDiffRepository :: (IsDiff o, IsRepository a) => a -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “repository” property. This is rarely needed directly, but it is used by new.

getDiffRepository :: (MonadIO m, IsDiff o) => o -> m (Maybe Repository) Source #

Get the value of the “repository” property. When overloading is enabled, this is equivalent to

get diff #repository