vcspull discover - vcspull.cli.discover

Discover repositories from filesystem for vcspull.

vcspull.cli.discover.get_git_origin_url(repo_path)[source]

Get the origin URL from a git repository.

Return type:

Optional[str]

Parameters:

repo_path (pathlib.Path) – Path to the git repository

Returns:

The origin URL if found, None otherwise

Return type:

str | None

vcspull.cli.discover.create_discover_subparser(parser)[source]

Create vcspull discover argument subparser.

Return type:

None

Parameters:

parser (argparse.ArgumentParser) – The parser to configure

vcspull.cli.discover._resolve_workspace_path(workspace_root, repo_path_str, *, cwd)[source]

Resolve workspace path from arguments.

Return type:

Path

Parameters:
  • workspace_root (str | None) – Workspace root path from user

  • repo_path_str (str | None) – Repo path from user

  • cwd (pathlib.Path) – Current working directory

Returns:

Resolved workspace path

Return type:

pathlib.Path

vcspull.cli.discover.discover_repos(scan_dir_str, config_file_path_str, recursive, workspace_root_override, yes, dry_run)[source]

Scan filesystem for git repositories and add to vcspull config.

Return type:

None

Parameters:
  • scan_dir_str (str) – Directory to scan for git repositories

  • config_file_path_str (str | None) – Path to config file, or None to use default

  • recursive (bool) – Whether to scan subdirectories recursively

  • workspace_root_override (str | None) – Workspace root to use in config (overrides automatic detection)

  • yes (bool) – Whether to skip confirmation prompt

  • dry_run (bool) – If True, preview changes without writing