+ __cache = None
+
+ def load(self):
+ """Load the whole configuration in __cache unless it has been
+ done already."""
+ if self.__cache is not None:
+ return
+ self.__cache = {}
+ lines = Run('git', 'config', '--null', '--list').raw_output()
+ for line in filter(None, lines.split('\0')):
+ key, value = line.split('\n', 1)
+ self.__cache.setdefault(key, []).append(value)