MCPcopy Index your code
hub / github.com/saltstack/salt / peel

Method peel

salt/utils/gitfs.py:1816–1827  ·  view source on GitHub ↗

Compatibility function for pygit2.Reference objects. Older versions of pygit2 use .get_object() to return the object to which the reference points, while newer versions use .peel(). In pygit2 0.27.4, .get_object() was removed. This function will try .peel() first and

(self, obj)

Source from the content-addressed store, hash-verified

1814 failhard(self.role)
1815
1816 def peel(self, obj):
1817 """
1818 Compatibility function for pygit2.Reference objects. Older versions of
1819 pygit2 use .get_object() to return the object to which the reference
1820 points, while newer versions use .peel(). In pygit2 0.27.4,
1821 .get_object() was removed. This function will try .peel() first and
1822 fall back to .get_object().
1823 """
1824 try:
1825 return obj.peel()
1826 except AttributeError:
1827 return obj.get_object()
1828
1829 def checkout(self, fetch_on_fail=True):
1830 """

Callers 3

checkoutMethod · 0.95
get_tree_from_branchMethod · 0.95
get_tree_from_tagMethod · 0.95

Calls 1

get_objectMethod · 0.80

Tested by

no test coverage detected