hit-0.1.0: Git operations

Portabilityunix
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>

Data.Git.Repository

Description

 

Synopsis

Documentation

data Git Source

represent an git repo, with possibly already opened filereaders for indexes and packs

data HTreeEnt Source

hierarchy tree, either a reference to a blob (file) or a tree (directory).

Constructors

TreeDir Ref HTree 
TreeFile Ref 

openRepo :: FilePath -> IO GitSource

open a new git repository context

closeRepo :: Git -> IO ()Source

close a git repository context, closing all remaining fileReaders.

withRepo :: FilePath -> (Git -> IO c) -> IO cSource

findRepo :: IO FilePathSource

find the git repository from the current directory.

findReference :: Git -> Ref -> IO ObjectLocationSource

execute a function f with a git context.

findReferencesWithPrefix :: Git -> String -> IO [Ref]Source

get all the references that start by a specific prefix

findObjectRaw :: Git -> Ref -> Bool -> IO (Maybe ObjectInfo)Source

get an object from repository

findObjectRawAt :: Git -> ObjectLocation -> Bool -> IO (Maybe ObjectInfo)Source

get an object from repository

findObject :: Git -> Ref -> Bool -> IO (Maybe Object)Source

get an object from repository using a ref.

findObjectAt :: Git -> ObjectLocation -> Bool -> IO (Maybe Object)Source

get an object from repository using a location to reference it.

buildHTree :: Git -> Object -> IO HTreeSource

build a hierarchy tree from a tree object

resolvePath :: Git -> Ref -> [ByteString] -> IO (Maybe Ref)Source

resolve the ref (tree or blob) related to a path at a specific commit ref

resolveTreeish :: Git -> Ref -> IO (Maybe Object)Source

returns a tree from a ref that might be either a commit, a tree or a tag.

resolveRevision :: Git -> Revision -> IO (Maybe Ref)Source

try to resolve a string to a specific commit ref for example: HEAD, HEAD^, master~3, shortRef

initRepo :: FilePath -> IO ()Source

initialize a new repository at a specific location.

isRepo :: FilePath -> IO BoolSource

basic checks to see if a specific path looks like a git repo.