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

Method __contains__

pygit2/index.py:523–535  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

521 return ConflictIterator(self._index)
522
523 def __contains__(self, path):
524 cancestor = ffi.new('git_index_entry **')
525 cours = ffi.new('git_index_entry **')
526 ctheirs = ffi.new('git_index_entry **')
527
528 err = C.git_index_conflict_get(
529 cancestor, cours, ctheirs, self._index._index, to_bytes(path)
530 )
531 if err == C.GIT_ENOTFOUND:
532 return False
533
534 check_error(err)
535 return True
536
537
538class ConflictIterator:

Callers

nothing calls this directly

Calls 2

to_bytesFunction · 0.85
check_errorFunction · 0.85

Tested by

no test coverage detected