diff options
Diffstat (limited to 'git_config.py')
| -rw-r--r-- | git_config.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git_config.py b/git_config.py index 6b1f7107..8c4efac8 100644 --- a/git_config.py +++ b/git_config.py | |||
| @@ -88,10 +88,12 @@ def _key(name): | |||
| 88 | class GitConfig(object): | 88 | class GitConfig(object): |
| 89 | _ForUser = None | 89 | _ForUser = None |
| 90 | 90 | ||
| 91 | _USER_CONFIG = '~/.gitconfig' | ||
| 92 | |||
| 91 | @classmethod | 93 | @classmethod |
| 92 | def ForUser(cls): | 94 | def ForUser(cls): |
| 93 | if cls._ForUser is None: | 95 | if cls._ForUser is None: |
| 94 | cls._ForUser = cls(configfile=os.path.expanduser('~/.gitconfig')) | 96 | cls._ForUser = cls(configfile=os.path.expanduser(cls._USER_CONFIG)) |
| 95 | return cls._ForUser | 97 | return cls._ForUser |
| 96 | 98 | ||
| 97 | @classmethod | 99 | @classmethod |
| @@ -373,6 +375,12 @@ class GitConfig(object): | |||
| 373 | GitError('git config %s: %s' % (str(args), p.stderr)) | 375 | GitError('git config %s: %s' % (str(args), p.stderr)) |
| 374 | 376 | ||
| 375 | 377 | ||
| 378 | class RepoConfig(GitConfig): | ||
| 379 | """User settings for repo itself.""" | ||
| 380 | |||
| 381 | _USER_CONFIG = '~/.repoconfig/config' | ||
| 382 | |||
| 383 | |||
| 376 | class RefSpec(object): | 384 | class RefSpec(object): |
| 377 | """A Git refspec line, split into its components: | 385 | """A Git refspec line, split into its components: |
| 378 | 386 | ||
