Portability | unix |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Safe Haskell | None |
- data Git
- type HTree = [(Int, ByteString, HTreeEnt)]
- data HTreeEnt
- getCommit :: Git -> Ref -> IO (Maybe Commit)
- getTree :: Git -> Ref -> IO (Maybe Tree)
- rewrite :: Git -> (Commit -> IO Commit) -> Revision -> Int -> IO Ref
- buildHTree :: Git -> Tree -> IO HTree
- resolvePath :: Git -> Ref -> [ByteString] -> IO (Maybe Ref)
- resolveTreeish :: Git -> Ref -> IO (Maybe Tree)
- resolveRevision :: Git -> Revision -> IO (Maybe Ref)
- initRepo :: FilePath -> IO ()
- isRepo :: FilePath -> IO Bool
Documentation
represent an git repo, with possibly already opened filereaders for indexes and packs
type HTree = [(Int, ByteString, HTreeEnt)]Source
hierarchy tree, either a reference to a blob (file) or a tree (directory).
:: Git | Repository |
-> (Commit -> IO Commit) | Mapping function |
-> Revision | revision to start from |
-> Int | the number of parents to map |
-> IO Ref | return the new head REF |
Rewrite a set of commits from a revision and returns the new ref.
If during revision traversal (diving) there's a commit with zero or multiple parents then the traversal will stop regardless of the amount of parent requested.
calling rewrite f 2 (revisionOf d) on the following tree:
a <-- b <-- c <-- d
result in the following tree after mapping with f:
a <-- f(b) <-- f(c) <-- f(d)
resolve the ref (tree or blob) related to a path at a specific commit ref
resolveTreeish :: Git -> Ref -> IO (Maybe Tree)Source
returns a tree from a ref that might be either a commit, a tree or a tag.