libgit2

git_repository_commondir

Version:

Get the path of the shared common directory for this repository

If the repository is bare is not a worktree, the git directory path is returned.

Signature

const char *git_repository_commondir(const git_repository *repo);

Parameters

In
repo

A repository object

Returns

const char *

the path to the common dir

Versions