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

Function MatchGitignorePattern

internal/diff/gitignore.go:31–33  ·  view source on GitHub ↗

MatchGitignorePattern reports whether relPath matches a single gitignore-style pattern, using the simplified semantics that diff.Provider already implements (basename match, prefix match, directory-only suffix). Useful when callers want to test a single pattern in isolation.

(relPath, pat string)

Source from the content-addressed store, hash-verified

29// already implements (basename match, prefix match, directory-only suffix).
30// Useful when callers want to test a single pattern in isolation.
31func MatchGitignorePattern(relPath, pat string) bool {
32 return matchGitignorePattern(relPath, pat)
33}

Callers 1

Calls 1

matchGitignorePatternFunction · 0.85

Tested by 1