code: def cfg_file(self):
          
          default_path = os.path.join(self.relpath, '.git', 'config')
          if os.path.exists(default_path):
              return default_path
  
          dotgitpath = os.path.join(self.relpath, '.git')
          cfg_path = None
          # with git submodules, .git is a file containing "gitdir: .../../path"
          if os.path.isfile(dotgitpath):
              with codecs.open(dotgitpath, 'r', encoding='utf8') as f:
                  for _line in f:
                      l = _line.strip()
                      if l.startswith('gitdir:'):
                          # gitdir: ../.git/modules/modname
                          cfg_path_relative = l.split('gitdir:', 1)[-1].strip()
                          cfg_path_absolute = os.path.abspath(
                              os.path.join(
                                  os.path.dirname(dotgitpath),
                                  cfg_path_relative,
                                  'config'))
                          cfg_path = cfg_path_absolute
                          log.debug(('cfg_path_absolute', cfg_path_absolute))
                          #raise Exception(cfg_path_absolute) #_absolute)
                          break
          return cfg_path
docs: Return the configuration file for the given repo path