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

Method __eq__

pygit2/index.py:459–466  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

457 return f'<{t.__module__}.{t.__qualname__} path={self.path} id={self.id} mode={self.mode}>'
458
459 def __eq__(self, other):
460 if self is other:
461 return True
462 if not isinstance(other, IndexEntry):
463 return NotImplemented
464 return (
465 self.path == other.path and self.id == other.id and self.mode == other.mode
466 )
467
468 def _to_c(self) -> tuple['ffi.GitIndexEntryC', 'ffi.ArrayC[ffi.char]']:
469 """Convert this entry into the C structure

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected