MCPcopy Create free account
hub / github.com/alibaba/open-code-review / IsPathExcluded

Function IsPathExcluded

internal/diff/gitignore.go:25–28  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 7

EnumerateMethod · 0.92
listFilesViaWalkMethod · 0.92
listWalkFilesMethod · 0.92
TestIsPathExcludedFunction · 0.85

Calls 1

isPathExcludedMethod · 0.95