(self, path: str | None = None)
| 85 | _config: 'GitConfigC' |
| 86 | |
| 87 | def __init__(self, path: str | None = None) -> None: |
| 88 | cconfig = ffi.new('git_config **') |
| 89 | |
| 90 | if not path: |
| 91 | err = C.git_config_new(cconfig) |
| 92 | else: |
| 93 | path_bytes = str_to_bytes(path, 'path') |
| 94 | err = C.git_config_open_ondisk(cconfig, path_bytes) |
| 95 | |
| 96 | check_error(err, io=True) |
| 97 | self._config = cconfig[0] |
| 98 | |
| 99 | @classmethod |
| 100 | def from_c(cls, repo: 'BaseRepository', ptr: 'GitConfigC') -> 'Config': |
nothing calls this directly
no test coverage detected