summaryrefslogtreecommitdiffstats
path: root/git_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'git_config.py')
-rw-r--r--git_config.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/git_config.py b/git_config.py
index bc7ed459..29d89797 100644
--- a/git_config.py
+++ b/git_config.py
@@ -56,16 +56,20 @@ class GitConfig(object):
56 return cls(file = os.path.join(gitdir, 'config'), 56 return cls(file = os.path.join(gitdir, 'config'),
57 defaults = defaults) 57 defaults = defaults)
58 58
59 def __init__(self, file, defaults=None): 59 def __init__(self, file, defaults=None, pickleFile=None):
60 self.file = file 60 self.file = file
61 self.defaults = defaults 61 self.defaults = defaults
62 self._cache_dict = None 62 self._cache_dict = None
63 self._section_dict = None 63 self._section_dict = None
64 self._remotes = {} 64 self._remotes = {}
65 self._branches = {} 65 self._branches = {}
66 self._pickle = os.path.join( 66
67 os.path.dirname(self.file), 67 if pickleFile is None:
68 '.repopickle_' + os.path.basename(self.file)) 68 self._pickle = os.path.join(
69 os.path.dirname(self.file),
70 '.repopickle_' + os.path.basename(self.file))
71 else:
72 self._pickle = pickleFile
69 73
70 def Has(self, name, include_defaults = True): 74 def Has(self, name, include_defaults = True):
71 """Return true if this configuration file has the key. 75 """Return true if this configuration file has the key.