| 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.Objects.Diff
Description
Represents a diff list.
Synopsis
- newtype Diff = Diff (ManagedPtr Diff)
- class (GObject o, IsDescendantOf Diff o) => IsDiff o
- toDiff :: (MonadIO m, IsDiff o) => o -> m Diff
- diffFindSimilar :: (HasCallStack, MonadIO m, IsDiff a, IsDiffFindOptions b) => a -> Maybe b -> m ()
- diffFormatEmail :: (HasCallStack, MonadIO m, IsDiff a, IsDiffFormatEmailOptions b) => a -> b -> m (Maybe Text)
- diffGetDelta :: (HasCallStack, MonadIO m, IsDiff a) => a -> CSize -> m (Maybe DiffDelta)
- diffGetNumDeltas :: (HasCallStack, MonadIO m, IsDiff a) => a -> m CSize
- diffMerge :: (HasCallStack, MonadIO m, IsDiff a, IsDiff b) => a -> b -> m ()
- diffNewBuffers :: (HasCallStack, MonadIO m, IsDiffOptions a) => Maybe ByteString -> Maybe Text -> Maybe ByteString -> Maybe Text -> Maybe a -> m (Maybe Diff)
- diffNewIndexToWorkdir :: (HasCallStack, MonadIO m, IsRepository a, IsIndex b, IsDiffOptions c) => a -> Maybe b -> Maybe c -> m (Maybe Diff)
- diffNewTreeToIndex :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsIndex c, IsDiffOptions d) => a -> Maybe b -> Maybe c -> Maybe d -> m (Maybe Diff)
- diffNewTreeToTree :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsTree c, IsDiffOptions d) => a -> Maybe b -> Maybe c -> Maybe d -> m (Maybe Diff)
- diffNewTreeToWorkdir :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsDiffOptions c) => a -> Maybe b -> Maybe c -> m (Maybe Diff)
- diffPrint :: (HasCallStack, MonadIO m, IsDiff a) => a -> DiffFormatType -> DiffLineCallback -> m ()
- constructDiffRepository :: (IsDiff o, MonadIO m, IsRepository a) => a -> m (GValueConstruct o)
- getDiffRepository :: (MonadIO m, IsDiff o) => o -> m (Maybe Repository)
Exported types
Memory-managed wrapper type.
Instances
| Eq Diff Source # | |
| GObject Diff Source # | |
Defined in GI.Ggit.Objects.Diff | |
| ManagedPtrNewtype Diff Source # | |
Defined in GI.Ggit.Objects.Diff Methods toManagedPtr :: Diff -> ManagedPtr Diff | |
| TypedObject Diff Source # | |
Defined in GI.Ggit.Objects.Diff | |
| HasParentTypes Diff Source # | |
Defined in GI.Ggit.Objects.Diff | |
| IsGValue (Maybe Diff) Source # | Convert |
Defined in GI.Ggit.Objects.Diff Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Diff -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Diff) | |
| type ParentTypes Diff Source # | |
Defined in GI.Ggit.Objects.Diff | |
class (GObject o, IsDescendantOf Diff o) => IsDiff o Source #
Instances
| (GObject o, IsDescendantOf Diff o) => IsDiff o Source # | |
Defined in GI.Ggit.Objects.Diff | |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, findSimilar, forceFloating, foreach, formatEmail, freezeNotify, getv, isFloating, merge, notify, notifyByPspec, print, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getDelta, getNumDeltas, getProperty, getQdata.
Setters
findSimilar
Arguments
| :: (HasCallStack, MonadIO m, IsDiff a, IsDiffFindOptions b) | |
| => a |
|
| -> Maybe b |
|
| -> m () | (Can throw |
Transform diff marking file renames, copies, etc.. If options is set to
Nothing, then the default options will be used.
formatEmail
Arguments
| :: (HasCallStack, MonadIO m, IsDiff a, IsDiffFormatEmailOptions b) | |
| => a |
|
| -> b |
|
| -> m (Maybe Text) | Returns: the patch or |
Create an e-mail ready patch from a diff.
getDelta
Arguments
| :: (HasCallStack, MonadIO m, IsDiff a) | |
| => a |
|
| -> CSize |
|
| -> m (Maybe DiffDelta) |
Get the delta at the specified index.
getNumDeltas
Arguments
| :: (HasCallStack, MonadIO m, IsDiff a) | |
| => a |
|
| -> m CSize | Returns: the number of deltas. |
Get the number of deltas in the diff.
merge
Arguments
| :: (HasCallStack, MonadIO m, IsDiff a, IsDiff b) | |
| => a |
|
| -> b |
|
| -> m () | (Can throw |
Merges from into onto unless error is set.
newBuffers
Arguments
| :: (HasCallStack, MonadIO m, IsDiffOptions a) | |
| => Maybe ByteString |
|
| -> Maybe Text |
|
| -> Maybe ByteString |
|
| -> Maybe Text |
|
| -> Maybe a |
|
| -> m (Maybe Diff) | Returns: a newly allocated |
Same as diffBlobs but using a buffers.
Creates a Diff which compares buffer1 and buffer2.
If diffOptions is Nothing then the defaults specified in
diffOptionsNew are used.
newIndexToWorkdir
diffNewIndexToWorkdir Source #
Arguments
| :: (HasCallStack, MonadIO m, IsRepository a, IsIndex b, IsDiffOptions c) | |
| => a |
|
| -> Maybe b | |
| -> Maybe c |
|
| -> m (Maybe Diff) | Returns: a newly allocated |
Creates a Diff which compares the working directory and the index.
If index is Nothing then repository index is used.
If diffOptions is Nothing then the defaults specified in
diffOptionsNew are used.
newTreeToIndex
Arguments
| :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsIndex c, IsDiffOptions d) | |
| => a |
|
| -> Maybe b |
|
| -> Maybe c | |
| -> Maybe d |
|
| -> m (Maybe Diff) | Returns: a newly allocated |
Creates a Diff which compares oldTree and the index.
If index is Nothing then repository index is used.
If diffOptions is Nothing then the defaults specified in
diffOptionsNew are used.
newTreeToTree
Arguments
| :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsTree c, IsDiffOptions d) | |
| => a |
|
| -> Maybe b |
|
| -> Maybe c |
|
| -> Maybe d |
|
| -> m (Maybe Diff) | Returns: a newly allocated |
Creates a Diff which compares oldTree and newTree.
If diffOptions is Nothing then the defaults specified in
diffOptionsNew are used.
newTreeToWorkdir
Arguments
| :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsDiffOptions c) | |
| => a |
|
| -> Maybe b |
|
| -> Maybe c |
|
| -> m (Maybe Diff) | Returns: a newly allocated |
Creates a Diff which compares the working directory and oldTree.
If diffOptions is Nothing then the defaults specified in
diffOptionsNew are used.
Arguments
| :: (HasCallStack, MonadIO m, IsDiff a) | |
| => a |
|
| -> DiffFormatType |
|
| -> DiffLineCallback |
|
| -> m () | (Can throw |
Iterates over diff generating text output like "git diff".
Properties
repository
No description available in the introspection data.
constructDiffRepository :: (IsDiff o, MonadIO m, IsRepository a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “repository” property. This is rarely needed directly, but it is used by new.
getDiffRepository :: (MonadIO m, IsDiff o) => o -> m (Maybe Repository) Source #
Get the value of the “repository” property.
When overloading is enabled, this is equivalent to
get diff #repository