Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Represents the entries in an index object.
Synopsis
- newtype IndexEntries = IndexEntries (ManagedPtr IndexEntries)
- indexEntriesGetByIndex :: (HasCallStack, MonadIO m) => IndexEntries -> Word64 -> m (Maybe IndexEntry)
- indexEntriesGetByPath :: (HasCallStack, MonadIO m, IsFile a) => IndexEntries -> a -> Int32 -> m (Maybe IndexEntry)
- indexEntriesRef :: (HasCallStack, MonadIO m) => IndexEntries -> m (Maybe IndexEntries)
- indexEntriesSize :: (HasCallStack, MonadIO m) => IndexEntries -> m Word32
- indexEntriesUnref :: (HasCallStack, MonadIO m) => IndexEntries -> m ()
Exported types
newtype IndexEntries Source #
Memory-managed wrapper type.
IndexEntries (ManagedPtr IndexEntries) |
Instances
Eq IndexEntries Source # | |
Defined in GI.Ggit.Structs.IndexEntries (==) :: IndexEntries -> IndexEntries -> Bool # (/=) :: IndexEntries -> IndexEntries -> Bool # | |
GBoxed IndexEntries Source # | |
Defined in GI.Ggit.Structs.IndexEntries | |
ManagedPtrNewtype IndexEntries Source # | |
Defined in GI.Ggit.Structs.IndexEntries toManagedPtr :: IndexEntries -> ManagedPtr IndexEntries | |
TypedObject IndexEntries Source # | |
Defined in GI.Ggit.Structs.IndexEntries | |
HasParentTypes IndexEntries Source # | |
Defined in GI.Ggit.Structs.IndexEntries | |
IsGValue (Maybe IndexEntries) Source # | Convert |
Defined in GI.Ggit.Structs.IndexEntries gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe IndexEntries -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe IndexEntries) | |
type ParentTypes IndexEntries Source # | |
Defined in GI.Ggit.Structs.IndexEntries |
Methods
Click to display all available methods, including inherited ones
getByIndex
indexEntriesGetByIndex Source #
:: (HasCallStack, MonadIO m) | |
=> IndexEntries |
|
-> Word64 |
|
-> m (Maybe IndexEntry) | Returns: a |
Get a IndexEntry
by index. Note that the returned IndexEntry
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 IndexEntry
will be reflected in the index once written
back to disk using indexWrite
.
getByPath
indexEntriesGetByPath Source #
:: (HasCallStack, MonadIO m, IsFile a) | |
=> IndexEntries |
|
-> a |
|
-> Int32 |
|
-> m (Maybe IndexEntry) | Returns: a |
Get a IndexEntry
by index. Note that the returned IndexEntry
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 IndexEntry
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
:: (HasCallStack, MonadIO m) | |
=> IndexEntries |
|
-> m (Maybe IndexEntries) | Returns: a |
Atomically increments the reference count of entries
by one.
This function is MT-safe and may be called from any thread.
size
:: (HasCallStack, MonadIO m) | |
=> IndexEntries |
|
-> m Word32 | Returns: the number of entries. |
Get the number of IndexEntry
entries.
unref
:: (HasCallStack, MonadIO m) | |
=> IndexEntries |
|
-> m () |
Atomically decrements the reference count of entries
by one.
If the reference count drops to 0, entries
is freed.