code: func (i *ignore) Relative(path string, isdir bool) Match {
  	// if we are on Windows, then translate the path to Unix form
  	_rel := path
  	if runtime.GOOS == "windows" {
  		_rel = filepath.ToSlash(_rel)
  	}
  
  	// iterate over the patterns for this ignore file
  	//      - iterate in reverse, since later patterns overwrite earlier
  	for _i := len(i._pattern) - 1; _i >= 0; _i-- {
  		_pattern := i._pattern[_i]
  		if _pattern.Match(_rel, isdir) {
  			return _pattern
  		}
  	}
  
  	// we don't match this file
  	return nil
  }
docs: // Relative attempts to match a path relative to the GitIgnore base
  // directory. isdir is used to indicate whether the path represents a file
  // or a directory. If the path is not matched by the GitIgnore, nil is
  // returned.