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

Method AddIgnoreRule

ignore.go:12–25  ·  view source on GitHub ↗
(rules string)

Source from the content-addressed store, hash-verified

10)
11
12func (v *Repository) AddIgnoreRule(rules string) error {
13 crules := C.CString(rules)
14 defer C.free(unsafe.Pointer(crules))
15
16 runtime.LockOSThread()
17 defer runtime.UnlockOSThread()
18
19 ret := C.git_ignore_add_rule(v.ptr, crules)
20 runtime.KeepAlive(v)
21 if ret < 0 {
22 return MakeGitError(ret)
23 }
24 return nil
25}
26
27func (v *Repository) ClearInternalIgnoreRules() error {
28 runtime.LockOSThread()

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by

no test coverage detected