(fn: Callable)
| 295 | |
| 296 | @staticmethod |
| 297 | def _from_found_config(fn: Callable) -> 'Config': |
| 298 | buf = ffi.new('git_buf *', (ffi.NULL, 0)) |
| 299 | err = fn(buf) |
| 300 | check_error(err, io=True) |
| 301 | cpath = ffi.string(buf.ptr).decode('utf-8') |
| 302 | C.git_buf_dispose(buf) |
| 303 | |
| 304 | return Config(cpath) |
| 305 | |
| 306 | @staticmethod |
| 307 | def get_system_config() -> 'Config': |
no test coverage detected