@@ -107,8 +107,9 @@ func SkipHidden(path string) bool {
108// FastGlobWalker provides gitignore-aware file walking with fastwalk
108// FastGlobWalker provides gitignore-aware file walking with fastwalk
109type FastGlobWalker struct {
109type FastGlobWalker struct {
110+ gitignore *ignore.GitIgnore
110− gitignore *ignore.GitIgnore
111+ crushignore *ignore.GitIgnore
111− rootPath string
112+ rootPath string
114func NewFastGlobWalker(searchPath string) *FastGlobWalker {
115func NewFastGlobWalker(searchPath string) *FastGlobWalker {
@@ -124,6 +125,14 @@ func NewFastGlobWalker(searchPath string) *FastGlobWalker {
128+ // Load crushignore if it exists
129+ crushignorePath := filepath.Join(searchPath, ".crushignore")
130+ if _, err := os.Stat(crushignorePath); err == nil {
131+ if ci, err := ignore.CompileIgnoreFile(crushignorePath); err == nil {
132+ walker.crushignore = ci
127 return walker
136 return walker
@@ -132,13 +141,25 @@ func (w *FastGlobWalker) shouldSkip(path string) bool {
132 return true
141 return true
144+ relPath, err := filepath.Rel(w.rootPath, path)
149+ // Check gitignore patterns if available
135 if w.gitignore != nil {
150 if w.gitignore != nil {
136− relPath, err := filepath.Rel(w.rootPath, path)
137 if err == nil && w.gitignore.MatchesPath(relPath) {
151 if err == nil && w.gitignore.MatchesPath(relPath) {
138 return true
152 return true
156+ // Check crushignore patterns if available
157+ if w.crushignore != nil {
158+ if err == nil && w.crushignore.MatchesPath(relPath) {
142 return false
163 return false