Portability | unix |
---|---|
Stability | experimental |
Maintainer | Nicolas DI PRIMA <nicolas@di-prima.fr> |
Safe Haskell | None |
- data BlobContent
- data BlobState = BlobState {
- bsFilename :: ByteString
- bsMode :: Int
- bsRef :: Ref
- bsContent :: BlobContent
- data BlobStateDiff
- getDiffWith :: (BlobStateDiff -> a -> a) -> a -> Revision -> Revision -> Git -> IO a
- data HitDiffContent
- data HitDiff = HitDiff {}
- defaultDiff :: BlobStateDiff -> [HitDiff] -> [HitDiff]
- getDiff :: Revision -> Revision -> Git -> IO [HitDiff]
Basic features
This is a blob description.
BlobState | |
|
data BlobStateDiff Source
Represents a file state between two references
:: (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.
This represents a diff.
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.