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

Method checkout_index

pygit2/repository.py:420–431  ·  view source on GitHub ↗

Checkout the given index or the repository's index For arguments, see Repository.checkout().

(self, index=None, **kwargs)

Source from the content-addressed store, hash-verified

418 payload.check_error(err)
419
420 def checkout_index(self, index=None, **kwargs):
421 """Checkout the given index or the repository's index
422
423 For arguments, see Repository.checkout().
424 """
425 with git_checkout_options(**kwargs) as payload:
426 err = C.git_checkout_index(
427 self._repo,
428 index._index if index else ffi.NULL,
429 payload.checkout_options,
430 )
431 payload.check_error(err)
432
433 def checkout_tree(self, treeish, **kwargs):
434 """Checkout the given treeish

Callers 1

checkoutMethod · 0.95

Calls 2

check_errorMethod · 0.80
git_checkout_optionsFunction · 0.70

Tested by

no test coverage detected