Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Util.Git

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

Instances details
Show Blob Source # 
Instance details

Defined in Util.Git

Methods

showsPrec :: Int -> Blob -> ShowS #

show :: Blob -> String #

showList :: [Blob] -> ShowS #

Eq Blob Source # 
Instance details

Defined in Util.Git

Methods

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

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

Ord Blob Source # 
Instance details

Defined in Util.Git

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 #

Pretty Blob Source # 
Instance details

Defined in Util.Git

data Tree Source #

Instances

Instances details
Show Tree Source # 
Instance details

Defined in Util.Git

Methods

showsPrec :: Int -> Tree -> ShowS #

show :: Tree -> String #

showList :: [Tree] -> ShowS #

Eq Tree Source # 
Instance details

Defined in Util.Git

Methods

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

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

Ord Tree Source # 
Instance details

Defined in Util.Git

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 #

Pretty Tree Source # 
Instance details

Defined in Util.Git

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

data Modification Source #

Add fname Nothing means add a directory.

Instances

Instances details
Show Modification Source # 
Instance details

Defined in Util.Git

Eq Modification Source # 
Instance details

Defined in Util.Git

Pretty Modification Source # 
Instance details

Defined in Util.Git

data ModifyFile Source #

Instances

Instances details
Show ModifyFile Source # 
Instance details

Defined in Util.Git

Eq ModifyFile Source # 
Instance details

Defined in Util.Git

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

Apply a list of modifications to an existing tree.

commit

data CommitData Source #

Instances

Instances details
Show CommitData Source # 
Instance details

Defined in Util.Git

Eq CommitData Source # 
Instance details

Defined in Util.Git

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

Instances details
Show File Source # 
Instance details

Defined in Util.Git

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

Eq File Source # 
Instance details

Defined in Util.Git

Methods

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

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

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