(self, ref: str, fn: Callable)
| 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)) |
| 79 | err = fn(buf, self._refspec, to_bytes(ref)) |
| 80 | check_error(err) |
| 81 | |
| 82 | try: |
| 83 | return ffi.string(buf.ptr).decode('utf-8') |
| 84 | finally: |
| 85 | C.git_buf_dispose(buf) |
| 86 | |
| 87 | def transform(self, ref: str) -> str: |
| 88 | """Transform a reference name according to this refspec from the lhs to |
no test coverage detected