git_odb_write

Write an object directly into the ODB

This method writes a full object straight into the ODB. For most cases, it is preferred to write objects through a write stream, which is both faster and less memory intensive, specially for big objects.

This method is provided for compatibility with custom backends which are not able to support streaming writes

extern (C) nothrow @nogc
int
git_odb_write

Parameters

out_ libgit2_d.oid.git_oid*

pointer to store the OID result of the write

odb libgit2_d.types.git_odb*

object database where to store the object

data const(void)*

buffer with the data to store

len size_t

size of the buffer

type libgit2_d.types.git_object_t

type of the data to store

Return Value

Type: int

0 or an error code

Meta