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

Method StatusFile

status.go:180–194  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

178}
179
180func (v *Repository) StatusFile(path string) (Status, error) {
181 var statusFlags C.uint
182 cPath := C.CString(path)
183 defer C.free(unsafe.Pointer(cPath))
184
185 runtime.LockOSThread()
186 defer runtime.UnlockOSThread()
187
188 ret := C.git_status_file(&statusFlags, v.ptr, cPath)
189 runtime.KeepAlive(v)
190 if ret < 0 {
191 return 0, MakeGitError(ret)
192 }
193 return Status(statusFlags), nil
194}

Callers 1

TestStatusFileFunction · 0.80

Calls 3

MakeGitErrorFunction · 0.85
StatusTypeAlias · 0.85
freeMethod · 0.80

Tested by 1

TestStatusFileFunction · 0.64