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

Method dst_matches

pygit2/refspec.py:72–75  ·  view source on GitHub ↗

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

(self, ref: str)

Source from the content-addressed store, hash-verified

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
74 refspec, False otherwise."""
75 return bool(C.git_refspec_dst_matches(self._refspec, to_bytes(ref)))
76
77 def _transform(self, ref: str, fn: Callable) -> str:
78 buf = ffi.new('git_buf *', (ffi.NULL, 0))

Callers 1

test_refspecFunction · 0.80

Calls 1

to_bytesFunction · 0.85

Tested by 1

test_refspecFunction · 0.64