libgit2

git_odb_refresh

Version:

Refresh the object database to load newly added files.

If the object databases have changed on disk while the library is running, this function will force a reload of the underlying indexes.

Use this function when you're confident that an external application has tampered with the ODB.

NOTE that it is not necessary to call this function at all. The library will automatically attempt to refresh the ODB when a lookup fails, to see if the looked up object exists on disk but hasn't been loaded yet.

Signature

int git_odb_refresh(struct git_odb *db);

Parameters

struct git_odb *
In
db

database to refresh

Returns

int

0 on success, error code otherwise

Versions