libgit2

git_odb_read

Version:

Read an object from the database.

If GIT_ENOTFOUND then out->data is set to NULL.

Signature

int git_odb_read(git_rawobj *out, git_odb *db, const git_oid *id);

Parameters

In
out

object descriptor to populate upon reading.

git_odb *
In
db

database to search for the object in.

In
id

identity of the object to read.

Returns

int
  • GIT_SUCCESS if the object was read;
  • GIT_ENOTFOUND if the object is not in the database.

Versions