libgit2_d.odb

Undocumented in source.

Members

Aliases

git_odb_foreach_cb
alias git_odb_foreach_cb = int function(const(libgit2_d.oid.git_oid)* id, void* payload)

Function type for callbacks from git_odb_foreach.

Functions

git_odb_add_alternate
int git_odb_add_alternate(libgit2_d.types.git_odb* odb, libgit2_d.types.git_odb_backend* backend, int priority)

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

git_odb_add_backend
int git_odb_add_backend(libgit2_d.types.git_odb* odb, libgit2_d.types.git_odb_backend* backend, int priority)

Add a custom backend to an existing Object DB

git_odb_add_disk_alternate
int git_odb_add_disk_alternate(libgit2_d.types.git_odb* odb, const(char)* path)

Add an on-disk alternate to an existing Object DB.

git_odb_exists
int git_odb_exists(libgit2_d.types.git_odb* db, const(libgit2_d.oid.git_oid)* id)

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

git_odb_exists_prefix
int git_odb_exists_prefix(libgit2_d.oid.git_oid* out_, libgit2_d.types.git_odb* db, const(libgit2_d.oid.git_oid)* short_id, size_t len)

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

git_odb_expand_ids
int git_odb_expand_ids(libgit2_d.types.git_odb* db, .git_odb_expand_id* ids, size_t count)

Determine if one or more objects can be found in the object database by their abbreviated object ID and type. The given array will be 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.

git_odb_foreach
int git_odb_foreach(libgit2_d.types.git_odb* db, .git_odb_foreach_cb cb, void* payload)

List all objects available in the database

git_odb_free
void git_odb_free(libgit2_d.types.git_odb* db)

Close an open object database.

git_odb_get_backend
int git_odb_get_backend(libgit2_d.types.git_odb_backend** out_, libgit2_d.types.git_odb* odb, size_t pos)

Lookup an ODB backend object by index

git_odb_hash
int git_odb_hash(libgit2_d.oid.git_oid* out_, const(void)* data, size_t len, libgit2_d.types.git_object_t type)

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

git_odb_hashfile
int git_odb_hashfile(libgit2_d.oid.git_oid* out_, const(char)* path, libgit2_d.types.git_object_t type)

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.

git_odb_new
int git_odb_new(libgit2_d.types.git_odb** out_)

Create a new object database with no backends.

git_odb_num_backends
size_t git_odb_num_backends(libgit2_d.types.git_odb* odb)

Get the number of ODB backend objects

git_odb_object_data
const(void)* git_odb_object_data(libgit2_d.types.git_odb_object* object)

Return the data of an ODB object

git_odb_object_dup
int git_odb_object_dup(libgit2_d.types.git_odb_object** dest, libgit2_d.types.git_odb_object* source)

Create a copy of an odb_object

git_odb_object_free
void git_odb_object_free(libgit2_d.types.git_odb_object* object)

Close an ODB object

git_odb_object_id
const(libgit2_d.oid.git_oid)* git_odb_object_id(libgit2_d.types.git_odb_object* object)

Return the OID of an ODB object

git_odb_object_size
size_t git_odb_object_size(libgit2_d.types.git_odb_object* object)

Return the size of an ODB object

git_odb_object_type
libgit2_d.types.git_object_t git_odb_object_type(libgit2_d.types.git_odb_object* object)

Return the type of an ODB object

git_odb_open
int git_odb_open(libgit2_d.types.git_odb** out_, const(char)* objects_dir)

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

git_odb_open_rstream
int git_odb_open_rstream(libgit2_d.types.git_odb_stream** out_, size_t* len, libgit2_d.types.git_object_t* type, libgit2_d.types.git_odb* db, const(libgit2_d.oid.git_oid)* oid)

Open a stream to read an object from the ODB

git_odb_open_wstream
int git_odb_open_wstream(libgit2_d.types.git_odb_stream** out_, libgit2_d.types.git_odb* db, libgit2_d.types.git_object_size_t size, libgit2_d.types.git_object_t type)

Open a stream to write an object into the ODB

git_odb_read
int git_odb_read(libgit2_d.types.git_odb_object** out_, libgit2_d.types.git_odb* db, const(libgit2_d.oid.git_oid)* id)

Read an object from the database.

git_odb_read_header
int git_odb_read_header(size_t* len_out, libgit2_d.types.git_object_t* type_out, libgit2_d.types.git_odb* db, const(libgit2_d.oid.git_oid)* id)

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

git_odb_read_prefix
int git_odb_read_prefix(libgit2_d.types.git_odb_object** out_, libgit2_d.types.git_odb* db, const(libgit2_d.oid.git_oid)* short_id, size_t len)

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

git_odb_refresh
int git_odb_refresh(libgit2_d.types.git_odb* db)

Refresh the object database to load newly added files.

git_odb_stream_finalize_write
int git_odb_stream_finalize_write(libgit2_d.oid.git_oid* out_, libgit2_d.types.git_odb_stream* stream)

Finish writing to an odb stream

git_odb_stream_free
void git_odb_stream_free(libgit2_d.types.git_odb_stream* stream)

Free an odb stream

git_odb_stream_read
int git_odb_stream_read(libgit2_d.types.git_odb_stream* stream, char* buffer, size_t len)

Read from an odb stream

git_odb_stream_write
int git_odb_stream_write(libgit2_d.types.git_odb_stream* stream, const(char)* buffer, size_t len)

Write to an odb stream

git_odb_write
int git_odb_write(libgit2_d.oid.git_oid* out_, libgit2_d.types.git_odb* odb, const(void)* data, size_t len, libgit2_d.types.git_object_t type)

Write an object directly into the ODB

git_odb_write_pack
int git_odb_write_pack(libgit2_d.types.git_odb_writepack** out_, libgit2_d.types.git_odb* db, libgit2_d.indexer.git_indexer_progress_cb progress_cb, void* progress_payload)

Open a stream for writing a pack file to the ODB.

Structs

git_odb_expand_id
struct git_odb_expand_id

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

Meta