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

Method IsPathIgnored

ignore.go:39–54  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

37}
38
39func (v *Repository) IsPathIgnored(path string) (bool, error) {
40 var ignored C.int
41
42 cpath := C.CString(path)
43 defer C.free(unsafe.Pointer(cpath))
44
45 runtime.LockOSThread()
46 defer runtime.UnlockOSThread()
47
48 ret := C.git_ignore_path_is_ignored(&ignored, v.ptr, cpath)
49 runtime.KeepAlive(v)
50 if ret < 0 {
51 return false, MakeGitError(ret)
52 }
53 return ignored == 1, nil
54}

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by

no test coverage detected