| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Ggit.Structs.Reflog
Description
Represents a reflog.
Synopsis
- newtype Reflog = Reflog (ManagedPtr Reflog)
- noReflog :: Maybe 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.
Methods
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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> m (Maybe Reflog) | Returns: the passed in |
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
Atomically decrements the reference count of reflog by one.
If the reference count drops to 0, reflog is freed.