code: def check_root(self):
          '''
          Check if the relative root path exists in the checked-out copy of the
          remote. Return the full path to that relative root if it does exist,
          otherwise return None.
          '''
          # No need to pass an environment to self.root() here since per-saltenv
          # configuration is a gitfs-only feature and check_root() is not used
          # for gitfs.
          root_dir = salt.utils.path.join(self.cachedir, self.root()).rstrip(os.sep)
          if os.path.isdir(root_dir):
              return root_dir
          log.error(
              'Root path \'%s\' not present in %s remote \'%s\', '
              'skipping.', self.root(), self.role, self.id
          )
          return Nonf check_root(self):
          '''
          Check if the relative root path exists in the checked-out copy of the
          remote. Return the full path to that relative root if it does exist,
          otherwise return None.
          '''
          # No need to pass an environment to self.root() here since per-saltenv
          # configuration is a gitfs-only feature and check_root() is not used
          # for gitfs.
          root_dir = salt.utils.path.join(self.cachedir, self.root()).rstrip(os.sep)
          if os.path.isdir(root_dir):
              return root_dir
          log.error(
              'Root path \'%s\' not present in %s remote \'%s\', '
              'skipping.', self.root(), self.role, self.id
          )
          return None
docs: Check if the relative root path exists in the checked-out copy of the
          remote. Return the full path to that relative root if it does exist,
          otherwise return None.