code: func (n *name) Match(path string, isdir bool) bool {
  	// are we expecting a directory?
  	if n._directory && !isdir {
  		return false
  	}
  
  	// should we match the whole path, or just the last component?
  	if n._anchored {
  		return fnmatch.Match(n._fnmatch, path, 0)
  	} else {
  		_, _base := filepath.Split(path)
  		return fnmatch.Match(n._fnmatch, _base, 0)
  	}
  }
docs: // Match returns true if the given path matches the name pattern. If the
  // pattern is meant for directories only, and the path is not a directory,
  // Match will return false. The matching is performed by fnmatch(). It
  // is assumed path is relative to the base path of the owning GitIgnore.