libgit2

git_odb_expand_ids

Version:

Determine if one or more objects can be found in the object database by their abbreviated object ID and type.

The given array will be updated in place: for each abbreviated ID that is unique in the database, and of the given type (if specified), the full object ID, object ID length (GIT_OID_HEXSZ) and type will be written back to the array. For IDs that are not found (or are ambiguous), the array entry will be zeroed.

Note that since this function operates on multiple objects, the underlying database will not be asked to be reloaded if an object is not found (which is unlike other object database operations.)

Signature

int git_odb_expand_ids(git_odb *db, git_odb_expand_id *ids, size_t count);

Parameters

In
db

The database to be searched for the given objects.

In
ids

An array of short object IDs to search for

size_t
In
count

The length of the ids array

Returns

int

0 on success or an error code on failure

Versions