aboutsummaryrefslogtreecommitdiffstats
path: root/sync.go
Commit message (Collapse)AuthorAgeFilesLines
* Add log level system and sync loggingBernhard Guillon4 hours1-9/+8
| | | | | | | | | - log.go: log level system (DEBUG, INFO, WARN, ERROR, NONE) - CLI: -log-level flag (default info), -verbose as shorthand for debug - Watcher: logs sync/remove actions at INFO level - Watcher: logs events at DEBUG level - Errors: structured error messages (DISK FULL, PERMISSION DENIED, etc.) - Updated README with -log-level flag
* Add progress logging for initial syncBernhard Guillon4 hours1-1/+37
| | | | | | | | - Log start of sync with source directory - Print progress every 1000 files during sync - Log completion with stats (files, dirs, skipped, errors) and elapsed time - Print 'watcher: ready' when monitoring begins - Exit cleanly on dry-run
* Add structured error handling with retry logicBernhard Guillon4 hours1-7/+16
| | | | | | | | | | - errors.go: retry wrapper for transient errors (ENOENT), structured error logging (disk full, permission denied, symlink loops) - sync.go: continue on individual file errors, log clearly, skip broken symlinks instead of failing entire sync - watcher.go: log all errors with context, handle readlink failures - Added 11 tests for error handling scenarios - 50 tests passing
* Docker test fixes: directory pattern matching, mtime-based sync, Go versionBernhard Guillon4 hours1-0/+3
| | | | | | | | | | | | | | | | - Fixed directory pattern matching: go-gitignore doesn't match 'build/' against bare 'build', now checks with trailing slash appended - Added ModTime to FileMeta for reliable change detection (same-size file modifications now sync correctly) - Updated Dockerfile to golang:1.24-alpine (was 1.22) - Downgraded go.mod to Go 1.24 (system has custom 1.26.4 build) Docker tested with podman: - Initial sync correctly excludes ignored dirs/files - Nested .gitignore works (sub/ ignores *.tmp) - Watcher syncs new/modified/deleted files - Case-sensitive rename (Foo→foo) handled correctly - Same-size file modifications sync correctly
* Implement nested .gitignore support with GitignoreStackBernhard Guillon4 hours1-10/+14
| | | | | | | | | | | | | | | - Replaced go-gitignore with custom GitignoreStack that tracks multiple .gitignore files hierarchically - Patterns are processed in root-to-leaf order, last match wins - Negation patterns in child dirs override parent ignores - Patterns only apply within their directory scope (no leaking) - Added 6 new tests for nested .gitignore: - Scoped: patterns only affect own directory - Dir-scoped: different dirs can ignore different things - Negation override: child !pattern un-ignores parent's *.pattern - Deep nesting: 3+ levels of .gitignore - Parent scope doesn't leak to siblings - All 35 tests passing
* Initial project scaffoldingBernhard Guillon5 hours1-0/+106
- main.go: CLI entry point with flag parsing - gitignore.go: .gitignore loading and parsing - sync.go: initial sync with manifest tracking - watcher.go: fsnotify-based file watcher with debouncing - Dockerfile: multi-stage build for Alpine runtime