code: func CompileGlob(pat string) (glob Glob, err error) {
  	pat = toSlash(pat)
  	s, err := translateGlob(pat)
  	if err != nil {
  		return
  	}
  	r, err := regexp.Compile(s)
  	if err != nil {
  		return
  	}
  	glob = Glob{pat, r}
  	return
  }
docs: // CompileGlob translates pat into a form more convenient for
  // matching against paths in the store.