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

Function maybe_string

pygit2/utils.py:47–51  ·  view source on GitHub ↗
(ptr: 'char_pointer | None')

Source from the content-addressed store, hash-verified

45
46
47def maybe_string(ptr: 'char_pointer | None') -> str | None:
48 if not ptr:
49 return None
50
51 return ffi.string(ptr).decode('utf8', errors='surrogateescape')
52
53
54@overload

Callers 13

identMethod · 0.85
_update_tips_cbFunction · 0.85
get_credentialsFunction · 0.85
_checkout_notify_cbFunction · 0.85
_checkout_progress_cbFunction · 0.85
urlMethod · 0.85
__init__Method · 0.85
__init__Method · 0.85
nameMethod · 0.85
urlMethod · 0.85
push_urlMethod · 0.85

Calls 1

stringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…