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 |
GI.Ggit.Objects.Diff
Contents
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
- 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 (Maybe Text)
- diffGetDelta :: (HasCallStack, MonadIO m, IsDiff a) => a -> Word64 -> m (Maybe 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 (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, IsRepository a) => a -> IO (GValueConstruct o)
- getDiffRepository :: (MonadIO m, IsDiff o) => o -> m (Maybe Repository)
Exported types
Memory-managed wrapper type.
Constructors
Diff (ManagedPtr Diff) |
Instances
GObject Diff Source # | |
Defined in GI.Ggit.Objects.Diff Methods gobjectType :: IO GType # | |
HasParentTypes Diff Source # | |
Defined in GI.Ggit.Objects.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
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 |
|
-> Word64 |
|
-> m (Maybe DiffDelta) |
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 (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, IsRepository a) => a -> IO (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