libgit2

git_repository_workdir

Version:

Get the normalized path to the working directory of the repository.

If the repository is bare, there is no working directory and NULL we be returned.

Signature

const char *git_repository_workdir(git_repository *repo);

Parameters

In
repo

a repository object

Returns

const char *

NULL if the repository is bare; absolute path to the working directory otherwise.

Versions