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.Structs.IndexEntries

Contents

Description

Represents the entries in an index object.

Synopsis

Exported types

newtype IndexEntries Source #

Memory-managed wrapper type.

Constructors

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

Defined in GI.Ggit.Structs.IndexEntries

Methods

(==) :: IndexEntries -> IndexEntries -> Bool

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

BoxedObject IndexEntries Source # 
Instance details

Defined in GI.Ggit.Structs.IndexEntries

Methods

boxedType :: IndexEntries -> IO GType

IsGValue IndexEntries Source #

Convert IndexEntries to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Ggit.Structs.IndexEntries

Methods

toGValue :: IndexEntries -> IO GValue

fromGValue :: GValue -> IO IndexEntries

noIndexEntries :: Maybe IndexEntries Source #

A convenience alias for Nothing :: Maybe IndexEntries.

Methods

Overloaded methods

getByIndex

indexEntriesGetByIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexEntries

entries: a tIndexEntries.

-> Word64

idx: the index of the entry.

-> m (Maybe IndexEntry)

Returns: a tIndexEntry or Nothing if out of bounds.

Get a tIndexEntry by index. Note that the returned tIndexEntry is _only_ valid as long as:

1) The associated index has been closed 2) The entry has not been removed (see indexRemove) 3) The index has not been refreshed (see indexRead)

Changes to the tIndexEntry will be reflected in the index once written back to disk using indexWrite.

getByPath

indexEntriesGetByPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> IndexEntries

entries: a tIndexEntries.

-> a

file: the path to search.

-> Int32

stage: stage to search.

-> m (Maybe IndexEntry)

Returns: a tIndexEntry or Nothing if it was not found.

Get a tIndexEntry by index. Note that the returned tIndexEntry is _only_ valid as long as:

1) The associated index has not been closed 2) The entry has not been removed (see indexRemove) 3) The index has not been refreshed (see indexRead)

Changes to the tIndexEntry will be reflected in the index once written back to disk using indexWrite.

stage indicates the stage to search the file for. Stages are used in the index when merge conflicts occur, such that multiple versions of the same file can be represented in the index. Stage 0 is associated with the working tree, while stages 1 to 3 are associated with the various versions of the file in a merge conflict. The special value -1 can be used to match the first file encountered in any stage.

ref

indexEntriesRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexEntries

entries: a tIndexEntries.

-> m (Maybe IndexEntries)

Returns: a tIndexEntries or Nothing.

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

size

indexEntriesSize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexEntries

entries: a tIndexEntries.

-> m Word32

Returns: the number of entries.

Get the number of tIndexEntry entries.

unref

indexEntriesUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexEntries

entries: a tIndexEntries.

-> m () 

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