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

Function MatchGitignorePattern

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

80// already implements (basename match, prefix match, directory-only suffix).
81// Useful when callers want to test a single pattern in isolation.
82func MatchGitignorePattern(relPath, pat string) bool {
83 return matchGitignorePattern(relPath, pat)
84}

Callers 1

Calls 1

matchGitignorePatternFunction · 0.85

Tested by 1