vcspull worktree - vcspull.cli.worktreeΒΆ

Worktree management CLI for vcspull.

vcspull.cli.worktree.create_worktree_subparser(parser)[source]ΒΆ

Create vcspull worktree argument subparser.

Return type:

None

Parameters:

parser (argparse.ArgumentParser) – The parser to configure

vcspull.cli.worktree._add_common_args(parser)[source]ΒΆ

Add common arguments to worktree subparsers.

Return type:

None

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:

None

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:

None

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.