Look up *key* and parse its value as an integer as per the git-config rules. Return an integer. A value can have a suffix 'k', 'm' or 'g' which stand for 'kilo', 'mega' and 'giga' respectively.
(self, key: bytes | str)
| 235 | return res[0] != 0 |
| 236 | |
| 237 | def get_int(self, key: bytes | str) -> int: |
| 238 | """Look up *key* and parse its value as an integer as per the git-config |
| 239 | rules. Return an integer. |
| 240 | |
| 241 | A value can have a suffix 'k', 'm' or 'g' which stand for 'kilo', |
| 242 | 'mega' and 'giga' respectively. |
| 243 | """ |
| 244 | |
| 245 | entry = self._get_entry(key) |
| 246 | res = ffi.new('int64_t *') |
| 247 | err = C.git_config_parse_int64(res, entry.c_value) |
| 248 | check_error(err) |
| 249 | |
| 250 | return res[0] |
| 251 | |
| 252 | def add_file(self, path: str | Path, level: int = 0, force: int = 0) -> None: |
| 253 | """Add a config file instance to an existing config.""" |