git_odb_hashfile

Read a file from disk and fill a git_oid with the object id that the file would have if it were written to the Object Database as an object of the given type (w/o applying filters). Similar functionality to git.git's git hash-object without the -w flag, however, with the --no-filters flag. If you need filters, see git_repository_hashfile.

extern (C) nothrow @nogc
int
git_odb_hashfile

Parameters

out_ libgit2_d.oid.git_oid*

oid structure the result is written into.

path const(char)*

file to read and determine object id for

type libgit2_d.types.git_object_t

the type of the object that will be hashed

Return Value

Type: int

0 or an error code

Meta