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

Method checkout_tree

pygit2/repository.py:433–442  ·  view source on GitHub ↗

Checkout the given treeish For arguments, see Repository.checkout().

(self, treeish, **kwargs)

Source from the content-addressed store, hash-verified

431 payload.check_error(err)
432
433 def checkout_tree(self, treeish, **kwargs):
434 """Checkout the given treeish
435
436 For arguments, see Repository.checkout().
437 """
438 with git_checkout_options(**kwargs) as payload:
439 cptr = ffi.new('git_object **')
440 ffi.buffer(cptr)[:] = treeish._pointer[:]
441 err = C.git_checkout_tree(self._repo, cptr[0], payload.checkout_options)
442 payload.check_error(err)
443
444 def checkout(
445 self,

Callers 1

checkoutMethod · 0.95

Calls 2

check_errorMethod · 0.80
git_checkout_optionsFunction · 0.70

Tested by

no test coverage detected