Open a git repository by manually specifying its paths and the object database it will use.
The full path to the repository folder e.g. a '.git' folder for live repos, any folder for bare Equivalent to $GIT_DIR. Cannot be NULL.
A pointer to a git_odb created & initialized by the user (e.g. with custom backends). This object database will be owned by the repository and will be automatically free'd. It should not be manually free'd by the user, or this git_repository object will become invalid.
The full path to the index (dircache) file Equivalent to $GIT_INDEX_FILE. If NULL, "$GIT_DIR/index" is assumed.
The full path to the working tree of the repository, if the repository is not bare. Equivalent to $GIT_WORK_TREE. If NULL, the repository is assumed to be bare.
GIT_SUCCESS or an error code