Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
Reprensents a git reference specification.
Synopsis
- newtype RefSpec = RefSpec (ManagedPtr RefSpec)
- noRefSpec :: Maybe RefSpec
- refSpecGetDestination :: (HasCallStack, MonadIO m) => RefSpec -> m (Maybe Text)
- refSpecGetSource :: (HasCallStack, MonadIO m) => RefSpec -> m (Maybe Text)
- refSpecIsForced :: (HasCallStack, MonadIO m) => RefSpec -> m Bool
- refSpecRef :: (HasCallStack, MonadIO m) => RefSpec -> m (Maybe RefSpec)
- refSpecUnref :: (HasCallStack, MonadIO m) => RefSpec -> m ()
Exported types
Memory-managed wrapper type.
Methods
getDestination
refSpecGetDestination Source #
:: (HasCallStack, MonadIO m) | |
=> RefSpec |
|
-> m (Maybe Text) | Returns: the refspec's destination or |
Gets the refspec
's destination.
getSource
:: (HasCallStack, MonadIO m) | |
=> RefSpec |
|
-> m (Maybe Text) | Returns: the refspec's source or |
Gets the refspec
's source.
isForced
:: (HasCallStack, MonadIO m) | |
=> RefSpec |
|
-> m Bool | Returns: if updating is done forcefully. |
Whether updating is done forcefully.
ref
Atomically increments the reference count of refspec
by one.
This function is MT-safe and may be called from any thread.
unref
:: (HasCallStack, MonadIO m) | |
=> RefSpec |
|
-> m () |
Atomically decrements the reference count of refspec
by one.
If the reference count drops to 0, refspec
is freed.