refactor: simplify

This commit is contained in:
Carlos Alexandro Becker
2025-07-31 16:11:10 -03:00
committed by Kujtim Hoxha
parent 3ad5d5283a
commit ae421e29b0

View File

@@ -143,19 +143,17 @@ func (w *FastGlobWalker) shouldSkip(path string) bool {
relPath, err := filepath.Rel(w.rootPath, path)
if err != nil {
relPath = path
return false
}
// Check gitignore patterns if available
if w.gitignore != nil {
if err == nil && w.gitignore.MatchesPath(relPath) {
if w.gitignore.MatchesPath(relPath) {
return true
}
}
// Check crushignore patterns if available
if w.crushignore != nil {
if err == nil && w.crushignore.MatchesPath(relPath) {
if w.crushignore.MatchesPath(relPath) {
return true
}
}