libgit2

git_repository_open_bare

Version:

Open a bare repository on the serverside.

This is a fast open for bare repositories that will come in handy if you're e.g. hosting git repositories and need to access them efficiently

Note that the libgit2 library must be initialized using git_libgit2_init before any APIs can be called, including this one.

Signature

int git_repository_open_bare(git_repository **out, const char *bare_path);

Parameters

Out
out

Pointer to the repo which will be opened.

const char *
In
bare_path

Direct path to the bare repository

Returns

int

0 on success, or an error code

Versions