diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-25 22:32:56 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-25 22:32:56 +0300 |
| commit | 7c30b68f29049704c7fafed8015169e9c8047e46 (patch) | |
| tree | 2c3af6da0e87cec553d0fde02aaf04cb8c2a4e01 /internal/cli/handlers.go | |
| parent | af8ab19f5def6f00081b0a6d1e5b20b76683f720 (diff) | |
feat: add configurable work directory with default ~/git/gitsyncer-workdir
- 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>
Diffstat (limited to 'internal/cli/handlers.go')
| -rw-r--r-- | internal/cli/handlers.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/cli/handlers.go b/internal/cli/handlers.go index e2cad92..a2a9c94 100644 --- a/internal/cli/handlers.go +++ b/internal/cli/handlers.go @@ -103,7 +103,8 @@ func ShowConfigHelp() { "^codex/", "^temp-", "-wip$" - ] + ], + "work_dir": "~/git/gitsyncer-workdir" }`) } @@ -146,7 +147,7 @@ func ShowUsage(cfg *config.Config) { fmt.Println(" gitsyncer --version Show version information") fmt.Println("\nOptions:") fmt.Println(" --config <path> Path to configuration file") - fmt.Println(" --work-dir <path> Working directory for operations (default: .gitsyncer-work)") + fmt.Println(" --work-dir <path> Working directory for operations (default: ~/git/gitsyncer-workdir)") fmt.Println(" --create-github-repos Create missing GitHub repositories automatically") fmt.Println(" --create-codeberg-repos Create missing Codeberg repositories (not yet implemented)") fmt.Println(" --dry-run Show what would be done without doing it") |
