diff options
Diffstat (limited to 'git_config.py')
| -rw-r--r-- | git_config.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git_config.py b/git_config.py index e658b059..e1e20463 100644 --- a/git_config.py +++ b/git_config.py | |||
| @@ -265,9 +265,11 @@ class GitConfig(object): | |||
| 265 | This internal method populates the GitConfig cache. | 265 | This internal method populates the GitConfig cache. |
| 266 | 266 | ||
| 267 | """ | 267 | """ |
| 268 | d = self._do('--null', '--list').rstrip('\0') | ||
| 269 | c = {} | 268 | c = {} |
| 270 | for line in d.split('\0'): | 269 | d = self._do('--null', '--list') |
| 270 | if d is None: | ||
| 271 | return c | ||
| 272 | for line in d.rstrip('\0').split('\0'): | ||
| 271 | if '\n' in line: | 273 | if '\n' in line: |
| 272 | key, val = line.split('\n', 1) | 274 | key, val = line.split('\n', 1) |
| 273 | else: | 275 | else: |
