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

Function IsPathExcluded

internal/diff/gitignore.go:73–76  ·  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

71// gitignore-style patterns or any default excluded directory prefix
72// (see ExcludedDirs).
73func IsPathExcluded(repoDir, relPath string, patterns []string) bool {
74 stub := &Provider{repoDir: repoDir}
75 return stub.isPathExcluded(relPath, patterns)
76}
77
78// MatchGitignorePattern reports whether relPath matches a single
79// 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