libgit2

git_odb_exists_prefix

Version:

Determine if an object can be found in the object database by an abbreviated object ID.

Signature

int git_odb_exists_prefix(git_oid *out, git_odb *db, const git_oid *short_id, size_t len);

Parameters

In
out

The full OID of the found object if just one is found.

In
db

The database to be searched for the given object.

In
short_id

A prefix of the id of the object to read.

size_t
In
len

The length of the prefix.

Returns

int

0 if found, GIT_ENOTFOUND if not found, GIT_EAMBIGUOUS if multiple matches were found, other value < 0 if there was a read error.

Versions