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.