docs: def git_env(self):
          'Set the index file and prevent git from reading global configs.'
          env = dict(os.environ)
          for var in ["HOME", "XDG_CONFIG_HOME"]:
              env.pop(var, None)
          env["GIT_CONFIG_NOSYSTEM"] = "true"
          # Weirdly, GIT_INDEX_FILE is interpreted relative to the work tree. As
          # a workaround, we absoluteify the path.
          env["GIT_INDEX_FILE"] = os.path.abspath(self.index_file)
          return env