libgit2

git_odb_backend_loose

Version:

Create a backend for loose objects

Signature

int git_odb_backend_loose(git_odb_backend **out, const char *objects_dir, int compression_level, int do_fsync, unsigned int dir_mode, unsigned int file_mode);

Parameters

Out
out

location to store the odb backend pointer

const char *
In
objects_dir

the Git repository's objects directory

int
In
compression_level

zlib compression level (0-9), or -1 for the default

int
In
do_fsync

if non-zero, perform an fsync on write

unsigned int
In
dir_mode

permission to use when creating directories, or 0 for default

unsigned int
In
file_mode

permission to use when creating directories, or 0 for default

Returns

int

0 or an error code

Versions