gi-ggit-1.0.1: libgit2-glib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Ggit.Objects.TreeBuilder

Contents

Description

Represents a tree object.

Synopsis

Exported types

Methods

clear

treeBuilderClear Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a TreeBuilder.

-> m () 

Clear all entries in the tree builder.

getEntry

treeBuilderGetEntry Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a TreeBuilder.

-> Text

path: the path to remove.

-> m TreeEntry

Returns: the GGitTreeEntry or Nothing if no such entry exists.

Get an entry by path.

insert

treeBuilderInsert Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a TreeBuilder.

-> Text

filename: the file name.

-> OId

oid: the OId of the file blob to insert.

-> FileMode

fileMode: a FileMode.

-> m TreeEntry

Returns: a TreeEntry. (Can throw GError)

Insert a file with a given blob in the tree builder. If the tree builder already contains an entry for the given file, then this entry will be overwritten.

Note that the returned TreeEntry is bound to the lifetime of the tree builder and cannot be used after the tree builder has been freed.

remove

treeBuilderRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a TreeBuilder.

-> Text

path: the path to remove.

-> m ()

(Can throw GError)

Remove an entry from the builder by path.

write

treeBuilderWrite Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a TreeBuilder.

-> m OId

Returns: the OId of the created tree object. (Can throw GError)

Write the contents of the tree builder as a tree object.