aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Docker test fixes: directory pattern matching, mtime-based sync, Go versionBernhard Guillon8 hours5-7/+12
| | | | | | | | | | | | | | | | - 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 Guillon8 hours6-140/+374
| | | | | | | | | | | | | | | - 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
* Add watcher tests, refactor watch() to accept contextBernhard Guillon8 hours3-2/+338
| | | | | | | | | - Added watcher_test.go: 10 tests covering create, write, remove, rename, ignored files, debouncing, directory creation/removal, and manifest updates - Refactored watch() to accept context.Context for clean cancellation - Added signal handling (SIGINT/SIGTERM) for graceful shutdown in main.go - Fixed test expectations (version two = 11 bytes, not 10)
* Add sync and gitignore tests, fix loadGitignore bugBernhard Guillon8 hours3-7/+614
| | | | | | | | | | | | - Added gitignore_test.go: comprehensive tests for go-gitignore patterns - Verified: *, **, [], negation, anchored patterns, comments - Documented limitation: ? wildcard not supported by go-gitignore - Added sync_test.go: integration tests for initial sync - Tests: basic files, gitignore excludes, negation, double-star, directory patterns, symlinks, permissions, dry-run, .git skip, nested gitignore, complex combined patterns - Fixed gitignore.go: use CompileIgnoreFile instead of passing entire file content as single string to CompileIgnoreLines
* Initial project scaffoldingBernhard Guillon8 hours8-0/+414
- 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