git_odb_read_header

Read the header of an object from the database, without reading its full contents.

The header includes the length and the type of an object.

Note that most backends do not support reading only the header of an object, so the whole object will be read and then the header will be returned.

extern (C) nothrow @nogc public
int
git_odb_read_header

Parameters

len_out size_t*

pointer where to store the length

type_out libgit2.types.git_object_t*

pointer where to store the type

db libgit2.types.git_odb*

database to search for the object in.

id const(libgit2.oid.git_oid)*

identity of the object to read.

Return Value

Type: int

0 if the object was read, GIT_ENOTFOUND if the object is not in the database.

Meta