MCPcopy Create free account
hub / github.com/libgit2/git2go / IsHeadDetached

Method IsHeadDetached

repository.go:367–378  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

365}
366
367func (v *Repository) IsHeadDetached() (bool, error) {
368 runtime.LockOSThread()
369 defer runtime.UnlockOSThread()
370
371 ret := C.git_repository_head_detached(v.ptr)
372 runtime.KeepAlive(v)
373 if ret < 0 {
374 return false, MakeGitError(ret)
375 }
376
377 return ret != 0, nil
378}
379
380func (v *Repository) IsHeadUnborn() (bool, error) {
381 runtime.LockOSThread()

Callers

nothing calls this directly

Calls 1

MakeGitErrorFunction · 0.85

Tested by

no test coverage detected