watcher: ignore .git folder
1 file changed, 4 insertions(+), 0 deletions(-)
jump to
M internal/watcher/watcher.go → internal/watcher/watcher.go
@@ -60,6 +60,10 @@ if err != nil { return errors.WithMessagef(err, "could not walk directory %s", path) } if entry.IsDir() { + if entry.Name() == ".git" { + l.Debug("skipping directory", "entry", entry.Name()) + return fs.SkipDir + } l.Debug("adding directory to watcher", "path", path) if err = watcher.Add(path); err != nil { return errors.WithMessagef(err, "could not add directory %s to watcher", path)