(rules string)
| 780 | } |
| 781 | |
| 782 | func (r *Repository) AddGitIgnoreRules(rules string) error { |
| 783 | runtime.LockOSThread() |
| 784 | defer runtime.UnlockOSThread() |
| 785 | |
| 786 | crules := C.CString(rules) |
| 787 | defer C.free(unsafe.Pointer(crules)) |
| 788 | ret := C.git_ignore_add_rule(r.ptr, crules) |
| 789 | runtime.KeepAlive(r) |
| 790 | if ret < 0 { |
| 791 | return MakeGitError(ret) |
| 792 | } |
| 793 | return nil |
| 794 | } |
| 795 | |
| 796 | func (r *Repository) ClearGitIgnoreRules() error { |
| 797 | runtime.LockOSThread() |
nothing calls this directly
no test coverage detected