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

Method src_matches

pygit2/refspec.py:66–70  ·  view source on GitHub ↗

Return True if the given string matches the source of this refspec, False otherwise.

(self, ref: str)

Source from the content-addressed store, hash-verified

64 return C.git_refspec_direction(self._refspec)
65
66 def src_matches(self, ref: str) -> bool:
67 """Return True if the given string matches the source of this refspec,
68 False otherwise.
69 """
70 return bool(C.git_refspec_src_matches(self._refspec, to_bytes(ref)))
71
72 def dst_matches(self, ref: str) -> bool:
73 """Return True if the given string matches the destination of this

Callers 1

test_refspecFunction · 0.80

Calls 1

to_bytesFunction · 0.85

Tested by 1

test_refspecFunction · 0.64