Portability | unix |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Safe Haskell | None |
- data Git
- packedNamed :: Git -> PackedRef
- gitRepoPath :: Git -> FilePath
- openRepo :: FilePath -> IO Git
- closeRepo :: Git -> IO ()
- withRepo :: FilePath -> (Git -> IO c) -> IO c
- withCurrentRepo :: (Git -> IO a) -> IO a
- findRepo :: IO FilePath
- isRepo :: FilePath -> IO Bool
- initRepo :: FilePath -> 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)
- getObjectAt :: Git -> ObjectLocation -> Bool -> IO (Maybe Object)
- getObjectType :: Git -> Ref -> IO (Maybe ObjectType)
- setObject :: Git -> Object -> IO Ref
Documentation
represent an git repo, with possibly already opened filereaders for indexes and packs
packedNamed :: Git -> PackedRefSource
gitRepoPath :: Git -> FilePathSource
withCurrentRepo :: (Git -> IO a) -> IO aSource
execute a function on the current repository.
check findRepo to see how the git repository is found.
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
findReference :: Git -> Ref -> IO ObjectLocationSource
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.
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