code: protected function patternFromGlob($line)
      {
          $pattern = '#'.substr(Finder\Glob::toRegex($line), 2, -1).'#';
          $pattern = str_replace('[^/]*', '.*', $pattern);
  
          return array($pattern, false, true);
      }
docs: Generates an exclude pattern for filter() from a hg glob expression
  
  @param string $line A line from .hgignore in glob mode
  
  @return array An exclude pattern for filter()