git_repository_open_ext

Find and open a repository with extended controls.

extern (C) nothrow @nogc
int
git_repository_open_ext
(,
const(char)* path
,
uint flags
,
const(char)* ceiling_dirs
)

Parameters

out_ libgit2_d.types.git_repository**

Pointer to the repo which will be opened. This can actually be null if you only want to use the error code to see if a repo at this path could be opened.

path const(char)*

Path to open as git repository. If the flags permit "searching", then this can be a path to a subdirectory inside the working directory of the repository. May be null if flags is git_repository_open_flag_t.GIT_REPOSITORY_OPEN_FROM_ENV.

flags uint

A combination of the GIT_REPOSITORY_OPEN flags above.

ceiling_dirs const(char)*

A GIT_PATH_LIST_SEPARATOR delimited list of path prefixes at which the search for a containing repository should terminate.

Return Value

Type: int

0 on success, git_error_code.GIT_ENOTFOUND if no repository could be found, or -1 if there was a repository but open failed for some reason (such as repo corruption or system errors).

Meta