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

Method Prune

remote.go:1196–1213  ·  view source on GitHub ↗
(callbacks *RemoteCallbacks)

Source from the content-addressed store, hash-verified

1194}
1195
1196func (o *Remote) Prune(callbacks *RemoteCallbacks) error {
1197 var err error
1198 ccallbacks := populateRemoteCallbacks(&C.git_remote_callbacks{}, callbacks, &err)
1199 defer untrackCallbacksPayload(ccallbacks)
1200
1201 runtime.LockOSThread()
1202 defer runtime.UnlockOSThread()
1203
1204 ret := C.git_remote_prune(o.ptr, ccallbacks)
1205 runtime.KeepAlive(o)
1206 if ret == C.int(ErrorCodeUser) && err != nil {
1207 return err
1208 }
1209 if ret < 0 {
1210 return MakeGitError(ret)
1211 }
1212 return nil
1213}
1214
1215// DefaultApplyOptions returns default options for remote create
1216func DefaultRemoteCreateOptions() (*RemoteCreateOptions, error) {

Callers 1

TestRemotePruneFunction · 0.80

Calls 3

populateRemoteCallbacksFunction · 0.85
untrackCallbacksPayloadFunction · 0.85
MakeGitErrorFunction · 0.85

Tested by 1

TestRemotePruneFunction · 0.64