| Age | Commit message (Collapse) | Author |
|
- Add .json extension to default config path for clarity
- Update all documentation and help text
- Update config search paths to include the new default
The new default path is ~/.config/gitsyncer/config.json
(previously ~/.config/gitsyncer/config)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
- Change default config from ~/.gitsyncer.json to ~/.config/gitsyncer/config
- Update all documentation and help text to reflect new path
- LoadConfig still checks common locations for backward compatibility:
- ./gitsyncer.json
- ~/.config/gitsyncer/config (new default)
- ~/.gitsyncer.json
This follows the XDG Base Directory specification for better organization
of configuration files.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
- Added --delete-repo flag that accepts a repository name
- Implemented DeleteRepo() methods in both GitHub and Codeberg API clients
- Created HandleDeleteRepo handler with interactive confirmation
- Shows clear status of repository across all configured organizations
- Requires user to type "yes" to confirm deletion
- Provides detailed feedback on success/failure for each deletion
- Updated documentation and usage help
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
- Add work_dir field to configuration file
- Set default work directory to ~/git/gitsyncer-workdir (avoiding conflict with source repo)
- Support home directory expansion (~/) in work_dir config
- Command-line --work-dir flag takes precedence over config file
- Automatically create work directory if it doesn't exist
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Users can now exclude branches from synchronization using regex patterns
in the configuration file. This is useful for:
- Excluding temporary or experimental branches
- Skipping vendor or third-party branches
- Ignoring deployment-specific branches
Configuration example:
```json
{
"exclude_branches": [
"^codex/", // Exclude branches starting with "codex/"
"^temp-", // Exclude branches starting with "temp-"
"-wip$" // Exclude branches ending with "-wip"
]
}
```
Features:
- Regex pattern matching for flexible exclusion rules
- Clear reporting of excluded branches during sync
- Excluded branches are filtered from sync but still analyzed for abandonment
- Invalid regex patterns are reported but don't stop sync
The feature helps maintain cleaner synchronization by allowing users to
ignore branches that shouldn't be synchronized across all repositories.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Major refactoring to improve code maintainability:
1. Split main.go (481 lines → 72 lines) into internal/cli package:
- flags.go: Command-line flag definitions and parsing
- handlers.go: General command handlers (version, config, list operations)
- sync_handlers.go: Sync-specific handlers for all sync operations
2. Refactored sync.go to extract logic into separate files:
- git_operations.go: Git command helpers (merge, push, fetch, etc.)
- repository_setup.go: Repository initialization and remote configuration
- branch_sync.go: Branch synchronization helpers
3. Reduced function sizes to meet 30-line guideline:
- syncBranch: 104 lines → 26 lines
- SyncRepository: 97 lines → 44 lines
- main(): 465 lines → 63 lines
- getAllBranches: 32 lines → 9 lines
All functionality remains the same, but the code is now more modular,
testable, and easier to understand. Each function has a single, clear
responsibility.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|