Create a new Git repository in the given folder with extended controls.
This will initialize a new git repository (creating the repo_path if requested by flags) and working directory as needed. It will auto-detect the case sensitivity of the file system and if the file system supports file mode bits correctly.
Note that the libgit2 library must be initialized using
git_libgit2_init
before any APIs can be called, including
this one.
The path to the repository.
0 or an error code on failure.