Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Util.Git

Contents

Description

Higher level wrapper around the hlibgit2 binding to libgit2.

Synopsis

Documentation

initialize :: IO a -> IO a Source #

The library has to be initialized before you call any functions.

OID

data Blob Source #

Instances

Eq Blob # 

Methods

(==) :: Blob -> Blob -> Bool #

(/=) :: Blob -> Blob -> Bool #

Ord Blob # 

Methods

compare :: Blob -> Blob -> Ordering #

(<) :: Blob -> Blob -> Bool #

(<=) :: Blob -> Blob -> Bool #

(>) :: Blob -> Blob -> Bool #

(>=) :: Blob -> Blob -> Bool #

max :: Blob -> Blob -> Blob #

min :: Blob -> Blob -> Blob #

Show Blob # 

Methods

showsPrec :: Int -> Blob -> ShowS #

show :: Blob -> String #

showList :: [Blob] -> ShowS #

Pretty Blob # 

data Tree Source #

Instances

Eq Tree # 

Methods

(==) :: Tree -> Tree -> Bool #

(/=) :: Tree -> Tree -> Bool #

Ord Tree # 

Methods

compare :: Tree -> Tree -> Ordering #

(<) :: Tree -> Tree -> Bool #

(<=) :: Tree -> Tree -> Bool #

(>) :: Tree -> Tree -> Bool #

(>=) :: Tree -> Tree -> Bool #

max :: Tree -> Tree -> Tree #

min :: Tree -> Tree -> Tree #

Show Tree # 

Methods

showsPrec :: Int -> Tree -> ShowS #

show :: Tree -> String #

showList :: [Tree] -> ShowS #

Pretty Tree # 

type FileName = FilePath Source #

Repo-internal path.

type Ref = FilePath Source #

This has the initial refs/ stripped off.

repo

init :: Repo -> IO Bool Source #

True if it already existed.

blob

tree

modify_tree :: Repo -> Tree -> [Modification] -> IO Tree Source #

Apply a list of modifications to an existing tree.

commit

diff

diff_trees :: Repo -> Tree -> Tree -> IO [Modification] Source #

Recursively diff two trees.

refs

write_ref :: Repo -> Commit -> Ref -> IO () Source #

symbolic refs

read_refs :: RepoP -> IO [Ref] Source #

Read all the refs in the repo.

read_ref_map :: Repo -> IO (Map Ref Commit) Source #

Read all refs along with their commits.

HEAD ref

update_head :: Repo -> Commit -> IO () Source #

Point HEAD to a commit.

revwalk

read_log :: Repo -> Ref -> IO [Commit] Source #

Get commits in reverse chronological order from the given ref.

read_log_from :: Repo -> Commit -> IO [Commit] Source #

Read commits starting from the given commit.

read_log_head :: Repo -> IO [Commit] Source #

Get commits in reverse chronological order from the HEAD.

dir

data File Source #

Instances

Eq File # 

Methods

(==) :: File -> File -> Bool #

(/=) :: File -> File -> Bool #

Show File # 

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

misc

gc :: Repo -> IO () Source #

GC the repo. As far as I know, there's no way to do this with libgit2, so it invokes the standalone git command.

errors