1 Commits

Author SHA1 Message Date
Blair Hamilton
70f9fb45b8
Add sync feature with comprehensive testing and documentation
- Implement SyncDefaultBranch function with 4 safety checks
- Add 8 git helper functions (GetRemoteURL, HasLocalChanges, etc.)
- Add 640 lines of unit tests for git helpers (git_test.go)
- Add 2074 lines of sync tests with 45+ scenarios (sync_test.go)
- Integrate GHORG_SYNC_DEFAULT_BRANCH environment variable
- Add 8 testing targets to Makefile
- Update README.md with comprehensive sync feature documentation
- Update sample-conf.yaml with detailed configuration comments
- Add test coverage verification document

Safety checks implemented:
- Skips sync if uncommitted local changes
- Skips sync if unpushed commits
- Skips sync if commits not on default branch
- Skips sync if default branch diverged from HEAD

Test coverage: 51.6% overall, 76-100% on new functions
2025-12-08 11:14:28 -05:00