libgit2

git_refdb_backend

Version:

An instance for a custom backend

Signature

typedef struct git_refdb_backend { unsigned int version int (*)(int *, git_refdb_backend *, const char *) exists int (*)(git_reference **, git_refdb_backend *, const char *) lookup int (*)(git_reference_iterator **, struct git_refdb_backend *, const char *) iterator int (*)(git_refdb_backend *, const git_reference *, int) write int (*)(git_reference **, git_refdb_backend *, const char *, const char *, int) rename int (*)(git_refdb_backend *, const char *) delete int (*)(git_refdb_backend *) compress void (*)(git_refdb_backend *) free };

Members

unsigned int
version
int (*)(int *, git_refdb_backend *, const char *)
exists

Queries the refdb backend to determine if the given ref_name exists. A refdb implementation must provide this function.

int (*)(git_reference **, git_refdb_backend *, const char *)
lookup

Queries the refdb backend for a given reference. A refdb implementation must provide this function.

int (*)(git_reference_iterator **, struct git_refdb_backend *, const char *)
iterator

Allocate an iterator object for the backend.

A refdb implementation must provide this function.

int (*)(git_refdb_backend *, const git_reference *, int)
write
int (*)(git_reference **, git_refdb_backend *, const char *, const char *, int)
rename
int (*)(git_refdb_backend *, const char *)
delete

Deletes the given reference from the refdb. A refdb implementation must provide this function.

int (*)(git_refdb_backend *)
compress

Suggests that the given refdb compress or optimize its references. This mechanism is implementation specific. (For on-disk reference databases, this may pack all loose references.) A refdb implementation may provide this function; if it is not provided, nothing will be done.

void (*)(git_refdb_backend *)
free

Frees any resources held by the refdb. A refdb implementation may provide this function; if it is not provided, nothing will be done.

Parameter To

Versions