git_repository_head_detached_for_worktree

Check if a worktree's HEAD is detached

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

extern (C) nothrow @nogc
int
git_repository_head_detached_for_worktree

Parameters

repo libgit2_d.types.git_repository*

a repository object

name const(char)*

name of the worktree to retrieve HEAD for

Return Value

Type: int

1 if HEAD is detached, 0 if its not; error code if there was an error

Meta