gi-ggit-1.0.11: 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.Structs.BlameHunk

Description

Represents a blame hunk.

Synopsis

Exported types

newtype BlameHunk Source #

Memory-managed wrapper type.

Instances

Instances details
Eq BlameHunk Source # 
Instance details

Defined in GI.Ggit.Structs.BlameHunk

GBoxed BlameHunk Source # 
Instance details

Defined in GI.Ggit.Structs.BlameHunk

ManagedPtrNewtype BlameHunk Source # 
Instance details

Defined in GI.Ggit.Structs.BlameHunk

TypedObject BlameHunk Source # 
Instance details

Defined in GI.Ggit.Structs.BlameHunk

Methods

glibType :: IO GType #

HasParentTypes BlameHunk Source # 
Instance details

Defined in GI.Ggit.Structs.BlameHunk

IsGValue (Maybe BlameHunk) Source #

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

Instance details

Defined in GI.Ggit.Structs.BlameHunk

type ParentTypes BlameHunk Source # 
Instance details

Defined in GI.Ggit.Structs.BlameHunk

type ParentTypes BlameHunk = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

isBoundary, ref, unref.

Getters

getFinalCommitId, getFinalSignature, getFinalStartLineNumber, getLinesInHunk, getOrigCommitId, getOrigPath, getOrigSignature, getOrigStartLineNumber.

Setters

None.

getFinalCommitId

blameHunkGetFinalCommitId Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m (Maybe OId)

Returns: a OId or Nothing.

Get the id of the commit where this hunk was last changed.

getFinalSignature

blameHunkGetFinalSignature Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m (Maybe Signature)

Returns: a Signature or Nothing.

Get the signature of the final version of the hunk.

getFinalStartLineNumber

blameHunkGetFinalStartLineNumber Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m Word16

Returns: the final hunk line number.

Get the line number where the hunk begins in the final version of the file. Line numbers start at 1.

getLinesInHunk

blameHunkGetLinesInHunk Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m Word16

Returns: the number of lines in the hunk.

Get the number of lines in the hunk.

getOrigCommitId

blameHunkGetOrigCommitId Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m (Maybe OId)

Returns: a OId or Nothing.

Get the id of the commit where the hunk was found. This is usually the same the final commit id, except when GGIT_BLAME_TRACK_COPIES_ANY_COMMIT was used.

getOrigPath

blameHunkGetOrigPath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m (Maybe Text)

Returns: the path or Nothing.

Get the path of the file where this hunk originated, as of the commit specified by ggit_blame_hunk_get_orig_commit_id.

getOrigSignature

blameHunkGetOrigSignature Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m (Maybe Signature)

Returns: a Signature or Nothing.

Get the signature of the commit specified by ggit_blame_hunk_get_orig_commit_id.

getOrigStartLineNumber

blameHunkGetOrigStartLineNumber Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m Word16

Returns: the orig hunk line number.

Get the line number where the hunk begins in the file specified by ggit_blame_hunk_get_orig_path at the commit specified by ggit_blame_hunk_get_orig_commit_id. Line numbers start at 1.

isBoundary

blameHunkIsBoundary Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m Bool

Returns: whether the hunk is at a boundary commit.

Get whether the hunk has been tracked to a boundary commit (the root, or the commit specified in ggit_blame_options_set_oldest_commit).

ref

blameHunkRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m (Maybe BlameHunk)

Returns: a BlameHunk or Nothing.

Atomically increments the reference count of blameHunk by one. This function is MT-safe and may be called from any thread.

unref

blameHunkUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BlameHunk

blameHunk: a BlameHunk.

-> m () 

Atomically decrements the reference count of blameHunk by one. If the reference count drops to 0, blameHunk is freed.