libgit2

odb

Version:
Git object database routines

Objects

An open object database handle

An object read from the ODB

Structs

The information about object IDs to query in git_odb_expand_ids, which will be populated upon return

Callbacks

Function type for callbacks from git_odb_foreach

Functions

Create a new object database with no backends

Create a new object database and automatically add the two default backends:

Add an on-disk alternate to an existing Object DB

Close an open object database

Read an object from the database

Read an object from the database, given a prefix of its identifier

Read the header of an object from the database, without reading its full contents

Determine if the given object can be found in the object database

Determine if an object can be found in the object database by an abbreviated object ID

Determine if one or more objects can be found in the object database by their abbreviated object ID and type updated in place: for each abbreviated ID that is unique in the database, and of the given type (if specified), the full object ID, object ID length (GIT_OID_HEXSZ) and type will be written back to the array. For IDs that are not found (or are ambiguous), the array entry will be zeroed.

Refresh the object database to load newly added files

List all objects available in the database

Write an object directly into the ODB

Open a stream to write an object into the ODB

Write to an odb stream

Finish writing to an odb stream

Read from an odb stream

Free an odb stream

Open a stream to read an object from the ODB

Open a stream for writing a pack file to the ODB

Write a multi-pack-index file from all the `

Determine the object-ID (sha1 hash) of a data buffer

Read a file from disk and fill a git_oid with the object id that the file would have if it were written to the Object Database as an object of the given type (w/o applying filters) Similar functionality to git.git's git hash-object without the -w flag, however, with the --no-filters flag. If you need filters, see git_repository_hashfile.

Create a copy of an odb_object

Close an ODB object

Return the OID of an ODB object

Return the data of an ODB object

Return the size of an ODB object

Return the type of an ODB object

Add a custom backend to an existing Object DB

Add a custom backend to an existing Object DB; this backend will work as an alternate

Get the number of ODB backend objects

Lookup an ODB backend object by index

Set the git commit-graph for the ODB