### Namespace

# Ggit – 1.0

libgit2-glib is a glib wrapper library around the libgit2 git access library.

Version | 1.2.0
Authors | The libgit2-glib authors
License | LGPL2+
Website | https://wiki.gnome.org/Projects/Libgit2-glib
Source | https://gitlab.gnome.org/GNOME/libgit2-glib

#### Build

C headers | `libgit2-glib/ggit.h`
pkg-config files | `libgit2-glib-1.0`

#### Dependencies

GLib—2.0 | The base type system library
| Browse documentation
GObject—2.0 | The base type system library
| Browse documentation
Gio—2.0 | GObject interfaces and objects
| Browse documentation

#### Additional documentation

- Classes Hierarchy

#### Classes

Blame | Represents a blame. since: 1.0
Blob | Represents a blob object. since: 1.0
BlobOutputStream | Represents a blob stream object. since: 1.0
Branch | Represents a branch object. since: 1.0
CheckoutOptions | Represents the options used when doign a checkout. since: 1.0
CherryPickOptions | Represents the options used when doign a cherry-pick. since: 1.0
CloneOptions | Represents the options used when cloning. since: 1.0
Commit | Represents a commit object. since: 1.0
CommitParents | Represents the parents of a commit object. since: 1.0
Config | Represents a git configuration. since: 1.0
Cred | Represents a git credential. since: 1.0
CredPlaintext | Represents a plain text credential. since: 1.0
CredSshInteractive | Represents a ssh interactive credential. since: 1.0
CredSshKeyFromAgent | Represents a ssh key agent credential. since: 1.0
Diff | Represents a diff list. since: 1.0
DiffFindOptions | Represents options for finding diff similarity. since: 1.0
DiffFormatEmailOptions | since: 1.0
DiffOptions | Represents the options used when creating a `GgitDiff`. since: 1.0
Index | Represents an index object. since: 1.0
Mailmap | Represents a mailmap. since: 1.0
Native | Represents a generic native object. since: 1.0
Object | Represents a generic object in a repository. since: 1.0
ObjectFactory | Represents an object factory. since: 1.0
ObjectFactoryBase | Represents the base type for objects created by an object factory. since: 1.0
ProxyOptions | Represents a git proxy options. since: 1.0
PushOptions | Represents a git push options. since: 1.0
Rebase | Represents a rebase object. since: 1.0
Ref | Reprensents a git reference. since: 1.0
Remote | Represents a git remote. since: 1.0
RemoteCallbacks | Represents a git remote callbacks. since: 1.0
Repository | Represents an existing git repository including all of it’s object contents. since: 1.0
RevisionWalker | Represents a revision walker. since: 1.0
Signature | Represents an action signature. since: 1.0
SubmoduleUpdateOptions | Represents options for a submodule update. since: 1.0
Tag | Represents a tag object. since: 1.0
Tree | Represents a tree object. since: 1.0
TreeBuilder | Represents a tree object. since: 1.0

#### Structs

AnnotatedCommit | Represents an annotated commit object. since: 1.0
BlameHunk | Represents a blame hunk. since: 1.0
BlameOptions | Represents blame options. since: 1.0
BranchEnumerator | Represents a branch enumerator. since: 1.0
ConfigEntry | Represents a git configuration entry. since: 1.0
CredSshInteractivePrompt | Represents a ssh interactive prompt. since: 1.0
DiffBinary | Represents a diff binary. since: 1.0
DiffBinaryFile | Represents a diff binary file. since: 1.0
DiffDelta | Represents the changes done to one file. since: 1.0
DiffFile | Represents a file in a `GgitDiff`. since: 1.0
DiffHunk | Represents the hunk of a diff. since: 1.0
DiffLine | Represents the line of a diff. since: 1.0
DiffSimilarityMetric | Represents a similarity metric. since: 1.0
FetchOptions | Represents a git fetch options. since: 1.0
IndexEntries | Represents the entries in an index object. since: 1.0
IndexEntriesResolveUndo | Represents the resolve undo entries in an index object. since: 1.0
IndexEntry | Represents an index entry object. since: 1.0
IndexEntryResolveUndo | Represents an resolve undo index entry object. since: 1.0
MergeOptions | Represents the options used when merging. since: 1.0
Note | Represents a note object. since: 1.0
OId | Represents a unique ID of any object. since: 1.0
Patch | Represents a patch object. since: 1.0
RebaseOperation | Represents a rebase operation. since: 1.0
RebaseOptions | Represents the options used when rebasing. since: 1.0
Reflog | Represents a reflog. since: 1.0
ReflogEntry | Represents a reflog entry. since: 1.0
RefSpec | Reprensents a git reference specification. since: 1.0
RemoteHead | Represents a git remote head. since: 1.0
RevertOptions | Represents the options used when reverting. since: 1.0
StatusOptions | Represents the options used when creating getting file status. since: 1.0
Submodule | Represents a git submodule. since: 1.0
TransferProgress | Represents transfering progress. since: 1.0
TreeEntry | Represents an entry in a tree. since: 1.0

#### Enumerations

BranchType | The type of a branch. since: 1.0
CloneLocal | since: 1.0
ConfigLevel | Priority level of a config file. These priority levels correspond to the natural escalation logic (from higher to lower) when searching for config entries in git.git. since: 1.0
DeltaType | Describes the type of change the delta is. since: 1.0
DiffBinaryType | When producing a binary diff, the binary data returned will be either the deflated full (“literal”) contents of the file, or the deflated binary delta between the two sides (whichever is smaller). since: 1.0
DiffFormatType | Possible output formats for diff data. since: 1.0
DiffLineType | These values describe where a line came from and will be passed to the `GgitDiffLineCallback` when iterating over a diff. since: 1.0
Direction | since: 1.0
FileMode | since: 1.0
MergeFileFavor | since: 1.0
PackbuilderStage | Valid stages for pack building. since: 1.0
ProxyType | The type of proxy to use. since: 1.0
RebaseOperationType | Type of rebase operation in-progress. since: 1.0
RefType | Describes the type a reference is. since: 1.0
RemoteCompletionType | Argument to the completion callback which tells it which operation finished. since: 1.0
RemoteDownloadTagsType | Automatic tag following option. since: 1.0
ResetType | Describes the type of reset to perform. since: 1.0
StatusShow | Show options for #ggit_repository_file_status_foreach. Determines which files are included in the status. since: 1.0
SubmoduleIgnore | Describes which submodules should be ignored. since: 1.0
SubmoduleRecurse | Options for submodule recurse. Represents the value of `submodule.$name.fetchRecurseSubmodules` since: 1.0
SubmoduleUpdate | Describes how a submodule should be updated. since: 1.0
TreeWalkMode | Describes in which order a tree walk should be performed. since: 1.0

#### Bitfields

AttributeCheckFlags | Attribute check flags indicate the order in which to check for gitattributes. git core uses `GGIT_ATTRIBUTE_CHECK_FILE_THEN_INDEX` for all operations, except on checkout, where it uses `GGIT_ATTRIBUTE_CHECK_INDEX_THEN_FILE`. since: 1.0
BlameFlags | since: 1.0
CheckoutNotifyFlags | since: 1.0
CheckoutStrategy | since: 1.0
CreateFlags | Describes how something should be created. since: 1.0
Credtype | since: 1.0
DiffFindFlags | since: 1.0
DiffFlag | Describes the diff file and/or delta flags. since: 1.0
DiffFormatEmailFlags | since: 1.0
DiffOption | How the diff should be generated. since: 1.0
FeatureFlags | since: 1.0
MergeFileFlags | since: 1.0
MergeFlags | since: 1.0
SortMode | The type of sorting mode for the revision walker. since: 1.0
StashFlags | Describes how a stash should be applied. since: 1.0
StatusFlags | Describes a file’s status. since: 1.0
StatusOption | should be processed between the head and the index and enables the GIT_STATUS_INDEX_RENAMED as a possible status flag. GGIT_STATUS_OPTION_RENAMES_INDEX_TO_WORKDIR: indicates tha rename detection should be run between the index and the working directory and enabled GIT_STATUS_WT_RENAMED as a possible status flag. GGIT_STATUS_OPTION_SORT_CASE_SENSITIVELY: sort case sensitive. GGIT_STATUS_OPTION_SORT_CASE_INSENSITIVELY: sort case insensitive. GGIT_STATUS_OPTION_DEFAULT: default flags. Status options specified when using #ggit_repository_file_status_foreach. since: 1.0
SubmoduleStatus | FIXME. since: 1.0

#### Error Domains

Error | Error codes for the `GGIT_ERROR` error domain. since: 1.0

#### Callbacks

ConfigCallback | The type of the callback functions for retrieving values from a `GgitConfig`. See ggit_config_foreach(). since: 1.0
ConfigMatchCallback | The type of the callback functions for retrieving values from a `GgitConfig` using a regular expression. See ggit_config_match_foreach(). since: 1.0
CredAcquireCallback | Signature of a function which acquires a credential object. since: 1.0
DiffBinaryCallback | Called for each file. since: 1.0
DiffFileCallback | Called for each file. since: 1.0
DiffHunkCallback | Called for each hunk. since: 1.0
DiffLineCallback | Called for each line. since: 1.0
DiffSimilarityMetricBufferSignatureCallback | since: 1.0
DiffSimilarityMetricFileSignatureCallback | since: 1.0
DiffSimilarityMetricFreeSignatureCallback | since: 1.0
DiffSimilarityMetricSimilarityCallback | since: 1.0
NoteCallback | When iterating over all the notes, callback that will be issued per note. See ggit_repository_note_foreach(). since: 1.0
ReferencesCallback | The type of the callback functions for retrieving the references in a `GgitRepository`. See ggit_repository_references_foreach(). since: 1.0
ReferencesNameCallback | The type of the callback functions for retrieving the references in a `GgitRepository`. See ggit_repository_references_foreach_name(). since: 1.0
RemoteListCallback | The type of the callback functions for listing the references of a `GgitRemote`. See ggit_remote_list(). since: 1.0
StashCallback | When iterating over all the stashed states, callback that will be issued per entry. See ggit_repository_stash_foreach(). since: 1.0
StatusCallback | The type of the callback functions for retrieving the status of the files in a `GgitRepository`. See ggit_repository_file_status_foreach(). since: 1.0
SubmoduleCallback | The type of the callback functions for retrieving the submodules in a `GgitRepository`. See ggit_repository_submodule_foreach(). since: 1.0
TagCallback | When iterating over all the tags, callback that will be issued per entry. See ggit_repository_tag_foreach(). since: 1.0
TransferProgressCallback | Progress callbacks during indexing. since: 1.0
TreeWalkCallback | The type of the callback functions for walking a tree. See ggit_tree_walk(). since: 1.0

#### Functions

get_features | Gets the features of the library. since: 1.0
init | Call this function before using any other libgit2-glib function. since: 1.0
message_prettify | Prettify a commit message by removing excess whitespace and making sure the last line ends with a newline. If `strip_comments` is `TRUE`, then lines starting with a `comment_char` will be removed. since: 1.0

#### Function Macros

CHECK_VERSION | Compile-time version checking. Evaluates to `TRUE` if the version of libgit2-glib is greater than the required one. since: 1.0
ENCODE_VERSION | since: 1.0
OID | since: 1.0

#### Constants

BUILD_TYPE | The build type of the installed build. since: 1.0
MAJOR_VERSION | Libgit2-glib major version component (e.g. 1 if `GGIT_VERSION` is 1.2.3) since: 1.0
MINOR_VERSION | Libgit2-glib minor version component (e.g. 2 if `GGIT_VERSION` is 1.2.3) since: 1.0
VERSION_S | Libgit2-glib version, encoded as a string, useful for printing and concatenation. since: 1.0