gi-ggit-1.0.1: libgit2-glib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Ggit.Objects.Diff

Contents

Description

Represents a diff list.

Synopsis

Exported types

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

Methods

findSimilar

diffFindSimilar Source #

Arguments

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

diff: a Diff.

-> Maybe b

options: a DiffFindOptions 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 Diff.

-> b

options: a DiffFormatEmailOptions.

-> m 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 Diff.

-> Word64

index: the index.

-> m DiffDelta

Returns: a DiffDelta.

Get the delta at the specified index.

getNumDeltas

diffGetNumDeltas Source #

Arguments

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

diff: a Diff.

-> 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 Diff to merge into.

-> b

from: the Diff to merge.

-> m ()

(Can throw GError)

Merges from into onto unless error is set.

newIndexToWorkdir

diffNewIndexToWorkdir Source #

Arguments

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

repository: a Repository.

-> Maybe b

index: a Index, or Nothing.

-> Maybe c

diffOptions: a DiffOptions, or Nothing.

-> m Diff

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

Creates a Diff 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 Repository.

-> Maybe b

oldTree: a Tree to diff from.

-> Maybe c

index: a Index, or Nothing.

-> Maybe d

diffOptions: a DiffOptions, or Nothing.

-> m Diff

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

Creates a Diff 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 Repository.

-> Maybe b

oldTree: a Tree to diff from.

-> Maybe c

newTree: a Tree to diff to.

-> Maybe d

diffOptions: a DiffOptions, or Nothing.

-> m Diff

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

Creates a Diff 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 Repository.

-> Maybe b

oldTree: a Tree to diff from.

-> Maybe c

diffOptions: a DiffOptions, or Nothing.

-> m Diff

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

Creates a Diff 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 Diff.

-> DiffFormatType

type: a DiffFormatType.

-> DiffLineCallback

printCb: a DiffLineCallback.

-> m ()

(Can throw GError)

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

Properties

repository