libgit2

git_odb_add_alternate

Version:

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

Alternate backends are always checked for objects after all the main backends have been exhausted.

Writing is disabled on alternate backends.

Read <odb _backends.h> for more information.

Signature

int git_odb_add_alternate(git_odb *odb, git_odb_backend *backend, int priority);

Parameters

In
odb

database to add the backend to

In
backend

pointer to a git_odb_backend instance

int
In
priority

Returns

int

0 on sucess; error code otherwise

Versions