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 *) del int (*)(git_refdb_backend *) compress void (*)(git_refdb_backend *) free int (*)(git_reflog **, git_refdb_backend *, const char *) reflog_read int (*)(git_refdb_backend *, git_reflog *) reflog_write int (*)(git_refdb_backend *, const char *, const char *) reflog_rename int (*)(git_refdb_backend *, const char *) reflog_delete };

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 *)
del

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.

int (*)(git_reflog **, git_refdb_backend *, const char *)
reflog_read

Read the reflog for the given reference name.

int (*)(git_refdb_backend *, git_reflog *)
reflog_write

Write a reflog to disk.

int (*)(git_refdb_backend *, const char *, const char *)
reflog_rename

Rename a reflog

int (*)(git_refdb_backend *, const char *)
reflog_delete

Remove a reflog.

Parameter To

Versions