def _supports_git_config_flag(self):
        """Return if the installed version of git supports the -c flag.

        This will execute ``git --version`` on the first call and cache the
        result.
        """
        if not hasattr(self, '_git_version_at_least_180'):
            self._git_version_least_180 = False

            version_str = execute([self.git, 'version'], ignore_errors=True,
                                  none_on_ignored_error=True)

            if version_str:
                m = re.search('(\d+)\.(\d+)\.(\d+)', version_str)

                if m:
                    git_version = (int(m.group(1)),
                                   int(m.group(2)),
                                   int(m.group(3)))

                    self._git_version_at_least_180 = git_version >= (1, 8, 0)

        return self._git_version_at_least_180
dataset/ETHPy150Open reviewboard/rbtools/rbtools/clients/git.py/GitClient._supports_git_config_flag/original