MCPcopy Create free account
hub / github.com/libgit2/pygit2 / git_remote_callbacks

Function git_remote_callbacks

pygit2/callbacks.py:458–476  ·  view source on GitHub ↗
(payload)

Source from the content-addressed store, hash-verified

456
457@contextmanager
458def git_remote_callbacks(payload):
459 if payload is None:
460 payload = RemoteCallbacks()
461
462 cdata = ffi.new('git_remote_callbacks *')
463 C.git_remote_init_callbacks(cdata, C.GIT_REMOTE_CALLBACKS_VERSION)
464
465 # Plug callbacks
466 cdata.credentials = C._credentials_cb
467 cdata.update_tips = C._update_tips_cb
468 cdata.certificate_check = C._certificate_check_cb
469 # Payload
470 handle = ffi.new_handle(payload)
471 cdata.payload = handle
472
473 # Give back control
474 payload._stored_exception = None
475 payload.remote_callbacks = cdata
476 yield payload
477
478
479#

Callers 2

connectMethod · 0.70
pruneMethod · 0.70

Calls 1

RemoteCallbacksClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…