mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
refactor: simplify
This commit is contained in:
committed by
Kujtim Hoxha
parent
3ad5d5283a
commit
ae421e29b0
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user