git_repository_head_detached

Check if a repository's HEAD is detached

A repository's HEAD is detached when it points directly to a commit instead of a branch.

extern (C) nothrow @nogc
int
git_repository_head_detached

Parameters

repo libgit2_d.types.git_repository*

Repo to test

Return Value

Type: int

1 if HEAD is detached, 0 if it's not; error code if there was an error.

Meta