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

Function IsPathExcluded

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

20// gitignore-style patterns or any default excluded directory prefix
21// (see ExcludedDirs).
22func 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

Callers 4

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

Calls 1

isPathExcludedMethod · 0.95

Tested by 1

TestIsPathExcludedFunction · 0.68