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

Method _from_c

pygit2/index.py:484–493  ·  view source on GitHub ↗
(cls, centry)

Source from the content-addressed store, hash-verified

482
483 @classmethod
484 def _from_c(cls, centry):
485 if centry == ffi.NULL:
486 return None
487
488 entry = cls.__new__(cls)
489 entry.path = to_str(ffi.string(centry.path))
490 entry.mode = FileMode(centry.mode)
491 entry.id = Oid(raw=bytes(ffi.buffer(ffi.addressof(centry, 'id'))[:]))
492
493 return entry
494
495
496class ConflictCollection:

Callers 3

__getitem__Method · 0.45
__getitem__Method · 0.45
__next__Method · 0.45

Calls 3

to_strFunction · 0.85
FileModeClass · 0.85
stringMethod · 0.80

Tested by

no test coverage detected