hit-0.5.1: Git operations in haskell

Portabilityunix
Stabilityexperimental
MaintainerNicolas DI PRIMA <nicolas@di-prima.fr>
Safe HaskellNone

Data.Git.Diff

Contents

Description

 

Synopsis

Basic features

data BlobState Source

This is a blob description.

Constructors

BlobState 

data BlobStateDiff Source

Represents a file state between two references

getDiffWithSource

Arguments

:: (BlobStateDiff -> a -> a)

diff helper (State -> accumulator -> accumulator)

-> a

accumulator

-> Revision

commit revision

-> Revision

commit revision

-> Git

repository

-> IO a 

generate a diff list between two revisions with a given diff helper. Useful to extract any kind of information from two different revisions: For example you can get the number of deleted files: getDiffWith f 0 HEAD^ HEAD git where f (OnlyOld _) acc = acc+1 f _ acc = acc you even can get a full diff: see defaultDiff

Default helpers

data HitDiffContent Source

This is an example of how you can use Hit to get all of information between different revision.

Instances

data HitDiff Source

This represents a diff.

Constructors

HitDiff 

Instances

defaultDiff :: BlobStateDiff -> [HitDiff] -> [HitDiff]Source

A defaiult diff helper. It is an example about how you can write your own diff helper or you can use it if you want to get all of differences.

getDiffSource

Arguments

:: Revision

commit revision

-> Revision

commit revision

-> Git

repository

-> IO [HitDiff] 

A default Diff getter which returns all diff information (Mode, Content and Binary). gitDiff = getDiffWith defaultDiff