libgit2

git_odb_add_disk_alternate

Version:

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

Note that the added path must point to an objects, not to a full repository, to use it as an alternate store.

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

Writing is disabled on alternate backends.

Signature

int git_odb_add_disk_alternate(git_odb *odb, const char *path);

Parameters

In
odb

database to add the backend to

const char *
In
path

path to the objects folder for the alternate

Returns

int

0 on success; error code otherwise

Versions