| 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 |
GI.Ggit.Structs.Reflog
Description
Represents a reflog.
Synopsis
- newtype Reflog = Reflog (ManagedPtr Reflog)
- reflogAppend :: (HasCallStack, MonadIO m, IsSignature a) => Reflog -> OId -> a -> Text -> m ()
- reflogGetEntryCount :: (HasCallStack, MonadIO m) => Reflog -> m Word32
- reflogGetEntryFromIndex :: (HasCallStack, MonadIO m) => Reflog -> Word32 -> m (Maybe ReflogEntry)
- reflogRef :: (HasCallStack, MonadIO m) => Reflog -> m (Maybe Reflog)
- reflogRename :: (HasCallStack, MonadIO m) => Reflog -> Text -> m ()
- reflogUnref :: (HasCallStack, MonadIO m) => Reflog -> m ()
- reflogWrite :: (HasCallStack, MonadIO m) => Reflog -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq Reflog Source # | |
| GBoxed Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog | |
| ManagedPtrNewtype Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog Methods toManagedPtr :: Reflog -> ManagedPtr Reflog | |
| TypedObject Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog | |
| HasParentTypes Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog | |
| IsGValue (Maybe Reflog) Source # | Convert |
Defined in GI.Ggit.Structs.Reflog Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Reflog -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Reflog) | |
| type ParentTypes Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog | |
Methods
Click to display all available methods, including inherited ones
append
Arguments
| :: (HasCallStack, MonadIO m, IsSignature a) | |
| => Reflog |
|
| -> OId |
|
| -> a |
|
| -> Text |
|
| -> m () | (Can throw |
Creates a reflog entry.
getEntryCount
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> m Word32 | Returns: the number of log entries. |
Gets the number of log entries in reflog.
getEntryFromIndex
reflogGetEntryFromIndex Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> Word32 |
|
| -> m (Maybe ReflogEntry) | Returns: the reflog entry at the index, or |
Gets the ReflogEntry at idx in reflog, or Nothing if not found.
ref
Atomically increments the reference count of reflog by one.
This function is MT-safe and may be called from any thread.
rename
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> Text |
|
| -> m () | (Can throw |
Renames the reflog for to newName, on error error is set.
unref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> m () |
Atomically decrements the reference count of reflog by one.
If the reference count drops to 0, reflog is freed.
write
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> m () | (Can throw |
Write the reflog to disk.