| 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.Objects.Diff
Contents
Description
Represents a diff list.
- newtype Diff = Diff (ManagedPtr Diff)
- class GObject o => IsDiff o
- toDiff :: (MonadIO m, IsDiff o) => o -> m Diff
- noDiff :: Maybe Diff
- diffFindSimilar :: (HasCallStack, MonadIO m, IsDiff a, IsDiffFindOptions b) => a -> Maybe b -> m ()
- diffFormatEmail :: (HasCallStack, MonadIO m, IsDiff a, IsDiffFormatEmailOptions b) => a -> b -> m Text
- diffGetDelta :: (HasCallStack, MonadIO m, IsDiff a) => a -> Word64 -> m DiffDelta
- diffGetNumDeltas :: (HasCallStack, MonadIO m, IsDiff a) => a -> m Word64
- diffMerge :: (HasCallStack, MonadIO m, IsDiff a, IsDiff b) => a -> b -> m ()
- diffNewIndexToWorkdir :: (HasCallStack, MonadIO m, IsRepository a, IsIndex b, IsDiffOptions c) => a -> Maybe b -> Maybe c -> m Diff
- diffNewTreeToIndex :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsIndex c, IsDiffOptions d) => a -> Maybe b -> Maybe c -> Maybe d -> m Diff
- diffNewTreeToTree :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsTree c, IsDiffOptions d) => a -> Maybe b -> Maybe c -> Maybe d -> m Diff
- diffNewTreeToWorkdir :: (HasCallStack, MonadIO m, IsRepository a, IsTree b, IsDiffOptions c) => a -> Maybe b -> Maybe c -> m Diff
- diffPrint :: (HasCallStack, MonadIO m, IsDiff a) => a -> DiffFormatType -> DiffLineCallback -> m ()
- constructDiffRepository :: (IsDiff o, IsRepository a) => a -> IO (GValueConstruct o)
- getDiffRepository :: (MonadIO m, IsDiff o) => o -> m (Maybe Repository)
Exported types
Constructors
| Diff (ManagedPtr Diff) |
Methods
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 Text | Returns: the patch or |
Create an e-mail ready patch from a diff.
getDelta
Arguments
| :: (HasCallStack, MonadIO m, IsDiff a) | |
| => a |
|
| -> Word64 |
|
| -> m DiffDelta | Returns: a |
Get the delta at the specified index.
getNumDeltas
Arguments
| :: (HasCallStack, MonadIO m, IsDiff a) | |
| => a |
|
| -> m Word64 | 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.
newIndexToWorkdir
diffNewIndexToWorkdir Source #
Arguments
| :: (HasCallStack, MonadIO m, IsRepository a, IsIndex b, IsDiffOptions c) | |
| => a |
|
| -> Maybe b | |
| -> Maybe c |
|
| -> m 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 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 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 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
constructDiffRepository :: (IsDiff o, IsRepository a) => a -> IO (GValueConstruct o) Source #
getDiffRepository :: (MonadIO m, IsDiff o) => o -> m (Maybe Repository) Source #