vcspull worktree - vcspull.cli.worktree¶
Worktree management CLI for vcspull.
-
vcspull.cli.worktree.create_worktree_subparser(parser)¶
Create
vcspull worktreeargument subparser.- Parameters:
parser (argparse.ArgumentParser) – The parser to configure
- Return type:
-
vcspull.cli.worktree._add_common_args(parser)¶
Add common arguments to worktree subparsers.
- Parameters:
parser (argparse.ArgumentParser) – The subparser to add arguments to.
- Return type:
-
vcspull.cli.worktree.handle_worktree_command(args)¶
Handle the vcspull worktree command.
- Parameters:
args (argparse.Namespace) – Parsed command line arguments.
- Return type:
-
vcspull.cli.worktree._handle_list(repos, formatter, colors)¶
Handle the worktree list subcommand.
- 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.
- Return type:
Notes
See tests/test_worktree.py for integration tests.
-
vcspull.cli.worktree._emit_worktree_entry(entry, formatter, colors)¶
Emit a single worktree entry to both JSON and human output.
- 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.
- Return type:
-
vcspull.cli.worktree._handle_sync(repos, formatter, colors, *, dry_run=False)¶
Handle the worktree sync subcommand.
- 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.
- Return type:
Notes
See tests/test_worktree.py for integration tests.
-
vcspull.cli.worktree._handle_prune(repos, formatter, colors, *, dry_run=False)¶
Handle the worktree prune subcommand.
- 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.
- Return type:
Notes
See tests/test_worktree.py for integration tests.