gi-ggit-1.0.2: 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.Structs.DiffHunk

Contents

Description

Represents the hunk of a diff.

Synopsis

Exported types

newtype DiffHunk Source #

Memory-managed wrapper type.

Constructors

DiffHunk (ManagedPtr DiffHunk) 
Instances
BoxedObject DiffHunk Source # 
Instance details

Defined in GI.Ggit.Structs.DiffHunk

Methods

boxedType :: DiffHunk -> IO GType #

noDiffHunk :: Maybe DiffHunk Source #

A convenience alias for Nothing :: Maybe DiffHunk.

Methods

getHeader

diffHunkGetHeader :: (HasCallStack, MonadIO m) => DiffHunk -> m Text Source #

No description available in the introspection data.

getNewLines

diffHunkGetNewLines Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DiffHunk

hunk: a DiffHunk.

-> m Int32

Returns: the number of lines in the new file.

Gets the number of lines in the new file.

getNewStart

diffHunkGetNewStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DiffHunk

hunk: a DiffHunk.

-> m Int32

Returns: the starting line number in the new file.

Gets the starting line number in the new file.

getOldLines

diffHunkGetOldLines Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DiffHunk

hunk: a DiffHunk.

-> m Int32

Returns: the number of lines in the old file.

Gets the number of lines in the old file.

getOldStart

diffHunkGetOldStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DiffHunk

hunk: a DiffHunk.

-> m Int32

Returns: the starting line number in the old file.

Gets the starting line number in the old file.

ref

diffHunkRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DiffHunk

hunk: a DiffHunk.

-> m (Maybe DiffHunk)

Returns: a DiffHunk or Nothing.

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

unref

diffHunkUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DiffHunk

hunk: a DiffHunk.

-> m () 

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