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
int
git_odb_read_header

Parameters

len_out size_t*

pointer where to store the length

type_out libgit2_d.types.git_object_t*

pointer where to store the type

db libgit2_d.types.git_odb*

database to search for the object in.

id const(libgit2_d.oid.git_oid)*

identity of the object to read.

@return - 0 if the object was read; - git_error_code.GIT_ENOTFOUND if the object is not in the database.

Meta