libgit2

git_repository_new

Version:

Create a new repository with neither backends nor config object

Note that this is only useful if you wish to associate the repository with a non-filesystem-backed object database and config store.

Caveats: since this repository has no physical location, some systems can fail to function properly: locations under $GIT_DIR, $GIT_COMMON_DIR, or $GIT_INFO_DIR are impacted.

Signature

int git_repository_new(git_repository **out);

Parameters

In
out

The blank repository

Returns

int

0 on success, or an error code

Versions