License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unix |
Safe Haskell | None |
Language | Haskell98 |
- data Git
- packedNamed :: Git -> CachedPackedRef
- gitRepoPath :: Git -> FilePath
- configs :: Git -> IORef [Config]
- openRepo :: FilePath -> IO Git
- closeRepo :: Git -> IO ()
- withRepo :: FilePath -> (Git -> IO c) -> IO c
- withCurrentRepo :: (Git -> IO a) -> IO a
- findRepoMaybe :: IO (Maybe FilePath)
- findRepo :: IO FilePath
- isRepo :: FilePath -> IO Bool
- initRepo :: FilePath -> IO ()
- getDescription :: Git -> IO (Maybe String)
- setDescription :: Git -> String -> IO ()
- iterateIndexes :: Git -> (b -> (Ref, PackIndexReader) -> IO (b, Bool)) -> b -> IO b
- findReference :: Git -> Ref -> IO ObjectLocation
- findReferencesWithPrefix :: Git -> String -> IO [Ref]
- getObjectRaw :: Git -> Ref -> Bool -> IO (Maybe ObjectInfo)
- getObjectRawAt :: Git -> ObjectLocation -> Bool -> IO (Maybe ObjectInfo)
- getObject :: Git -> Ref -> Bool -> IO (Maybe Object)
- getObject_ :: Git -> Ref -> Bool -> IO Object
- getObjectAt :: Git -> ObjectLocation -> Bool -> IO (Maybe Object)
- getObjectType :: Git -> Ref -> IO (Maybe ObjectType)
- setObject :: Git -> Object -> IO Ref
Documentation
packedNamed :: Git -> CachedPackedRef Source
gitRepoPath :: Git -> FilePath Source
opening repositories
withCurrentRepo :: (Git -> IO a) -> IO a Source
execute a function on the current repository.
check findRepo to see how the git repository is found.
findRepoMaybe :: IO (Maybe FilePath) Source
Find the git repository from the current directory.
If the environment variable GIT_DIR is set then it's used, otherwise iterate from current directory, up to 128 parents for a .git directory
findRepo :: IO FilePath Source
Find the git repository from the current directory.
If the environment variable GIT_DIR is set then it's used, otherwise iterate from current directory, up to 128 parents for a .git directory
creating repositories
repository accessors
setDescription :: Git -> String -> IO () Source
set the repository's description
iterators
findReference :: Git -> Ref -> IO ObjectLocation Source
Get the object location of a specific reference
findReferencesWithPrefix :: Git -> String -> IO [Ref] Source
get all the references that start by a specific prefix
getting objects
getObjectRaw :: Git -> Ref -> Bool -> IO (Maybe ObjectInfo) Source
get an object from repository
getObjectRawAt :: Git -> ObjectLocation -> Bool -> IO (Maybe ObjectInfo) Source
get an object from repository
:: Git | repository |
-> Ref | the object's reference to |
-> Bool | whether to resolve deltas if found |
-> IO (Maybe Object) | returned object if found |
get an object from repository using a ref.
:: Git | repository |
-> Ref | the object's reference to |
-> Bool | whether to resolve deltas if found |
-> IO Object | returned object if found |
Just like getObject
but will raise a RefNotFound exception if the
reference cannot be found.
getObjectAt :: Git -> ObjectLocation -> Bool -> IO (Maybe Object) Source
get an object from repository using a location to reference it.
getObjectType :: Git -> Ref -> IO (Maybe ObjectType) Source
get an object type from repository