IsPathExcluded returns true when relPath matches any of the supplied gitignore-style patterns or any default excluded directory prefix (see ExcludedDirs).
(repoDir, relPath string, patterns []string)
| 20 | // gitignore-style patterns or any default excluded directory prefix |
| 21 | // (see ExcludedDirs). |
| 22 | func IsPathExcluded(repoDir, relPath string, patterns []string) bool { |
| 23 | stub := &Provider{repoDir: repoDir} |
| 24 | return stub.isPathExcluded(relPath, patterns) |
| 25 | } |
| 26 | |
| 27 | // MatchGitignorePattern reports whether relPath matches a single |
| 28 | // gitignore-style pattern, using the simplified semantics that diff.Provider |