'Retrieve the default configuration.
See git-config(1) for details on the files searched.'

@classmethod
def default_backends(cls):

    paths = []
    paths.append(os.path.expanduser('~/.gitconfig'))
    xdg_config_home = os.environ.get('XDG_CONFIG_HOME', os.path.expanduser('~/.config/'))
    paths.append(os.path.join(xdg_config_home, 'git', 'config'))
    if ('GIT_CONFIG_NOSYSTEM' not in os.environ):
        paths.append('/etc/gitconfig')
    backends = []
    for path in paths:
        try:
            cf = ConfigFile.from_path(path)
        except (IOError, OSError) as e:
            if (e.errno != errno.ENOENT):
                raise
            else:
                continue
        backends.append(cf)
    return backends
