vcspull worktree - vcspull.cli.worktreeΒΆ
Worktree management CLI for vcspull.
- vcspull.cli.worktree.create_worktree_subparser(parser)[source]ΒΆ
Create
vcspull worktreeargument subparser.- Return type:
- Parameters:
parser (argparse.ArgumentParser) β The parser to configure
- vcspull.cli.worktree._add_common_args(parser)[source]ΒΆ
Add common arguments to worktree subparsers.
- Return type:
- Parameters:
parser (argparse.ArgumentParser) β The subparser to add arguments to.
- vcspull.cli.worktree.handle_worktree_command(args)[source]ΒΆ
Handle the vcspull worktree command.
- Return type:
- Parameters:
args (argparse.Namespace) β Parsed command line arguments.
- vcspull.cli.worktree._handle_list(repos, formatter, colors)[source]ΒΆ
Handle the worktree list subcommand.
- Return type:
None
- Parameters:
repos (list[ConfigDict]) β List of repository configurations with worktrees.
formatter (OutputFormatter) β Output formatter for JSON/NDJSON/human output.
colors (Colors) β Color manager for terminal output.
Notes
See tests/test_worktree.py for integration tests.
- vcspull.cli.worktree._emit_worktree_entry(entry, formatter, colors)[source]ΒΆ
Emit a single worktree entry to both JSON and human output.
- Return type:
- Parameters:
entry (WorktreePlanEntry) β The worktree plan entry to emit.
formatter (OutputFormatter) β Output formatter for JSON/NDJSON/human output.
colors (Colors) β Color manager for terminal output.
- vcspull.cli.worktree._handle_sync(repos, formatter, colors, *, dry_run=False)[source]ΒΆ
Handle the worktree sync subcommand.
- Return type:
None
- Parameters:
repos (list[ConfigDict]) β List of repository configurations with worktrees.
formatter (OutputFormatter) β Output formatter for JSON/NDJSON/human output.
colors (Colors) β Color manager for terminal output.
dry_run (bool) β If True, only preview what would be synced.
Notes
See tests/test_worktree.py for integration tests.
- vcspull.cli.worktree._handle_prune(repos, formatter, colors, *, dry_run=False)[source]ΒΆ
Handle the worktree prune subcommand.
- Return type:
None
- Parameters:
repos (list[ConfigDict]) β List of repository configurations with worktrees.
formatter (OutputFormatter) β Output formatter for JSON/NDJSON/human output.
colors (Colors) β Color manager for terminal output.
dry_run (bool) β If True, only preview what would be pruned.
Notes
See tests/test_worktree.py for integration tests.