docs: def _needs_git(func):
      """
      Small decorator to make sure we have the git repo, or report error
      otherwise.
      """
  
      @wraps(func)
      def myfunc(*args, **kwargs):
          if not WITH_GIT:
              raise RuntimeError(
                  "Dulwich library not available, can't extract info from the "
                  "git repos."
              )
          return func(*args, **kwargs)
  
      return myfunc