libgit2

git_repository_path

Version:

Get one of the paths to the repository

Possible values for id:

GIT_REPO_PATH: return the path to the repository GIT_REPO_PATH_INDEX: return the path to the index GIT_REPO_PATH_ODB: return the path to the ODB GIT_REPO_PATH_WORKDIR: return the path to the working directory

Signature

const char *git_repository_path(git_repository *repo, git_repository_pathid id);

Parameters

In
repo

a repository object

In
id

The ID of the path to return

Returns

const char *

absolute path of the requested id

Versions