summaryrefslogtreecommitdiff
path: root/ignore.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2017-07-08 11:38:19 +0200
committerCarlos Martín Nieto <[email protected]>2017-07-08 11:38:19 +0200
commit7d29d6864474525c9853d86996d769a5459dc15d (patch)
tree330d588ef4b1b063724351b07d8e947a18c564b1 /ignore.go
parent58334cf60441bd713b8fd990e30e0580b97bf3ae (diff)
Second round of keep-alives
Diffstat (limited to 'ignore.go')
-rw-r--r--ignore.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/ignore.go b/ignore.go
index 6b12348..c698de1 100644
--- a/ignore.go
+++ b/ignore.go
@@ -17,6 +17,7 @@ func (v *Repository) AddIgnoreRule(rules string) error {
defer runtime.UnlockOSThread()
ret := C.git_ignore_add_rule(v.ptr, crules)
+ runtime.KeepAlive(v)
if ret < 0 {
return MakeGitError(ret)
}
@@ -28,6 +29,7 @@ func (v *Repository) ClearInternalIgnoreRules() error {
defer runtime.UnlockOSThread()
ret := C.git_ignore_clear_internal_rules(v.ptr)
+ runtime.KeepAlive(v)
if ret < 0 {
return MakeGitError(ret)
}
@@ -44,6 +46,7 @@ func (v *Repository) IsPathIgnored(path string) (bool, error) {
defer runtime.UnlockOSThread()
ret := C.git_ignore_path_is_ignored(&ignored, v.ptr, cpath)
+ runtime.KeepAlive(v)
if ret < 0 {
return false, MakeGitError(ret)
}