Skip to content

Add --clone flag for clone-only mode#5

Merged
JaredHatfield merged 3 commits intomainfrom
copilot/add-shortcut-commands
Feb 25, 2026
Merged

Add --clone flag for clone-only mode#5
JaredHatfield merged 3 commits intomainfrom
copilot/add-shortcut-commands

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

The issue requests shortcut flags (--clone, --pull) to skip unnecessary steps when the user knows what they want. After analysis, only --clone is implemented — --pull cannot skip the expensive per-repo operations (fetch, dirty check, checkout, pull) so it provides no meaningful speedup.

What --clone skips

  • All ProcessRepo work for existing repos (git fetch, submodule init, status check, checkout, pull)
  • Directory auditing output (collisions, unknown folders, excluded-but-present)
  • Progress bar scoped to only missing repos

Config loading, GitHub API call, filtering, and directory scan still run (required to determine what's missing).

Changes

  • main.go: Add --clone flag; branch sync logic into clone-only vs full-sync paths. Mode flags are documented as mutually exclusive for when additional modes are added.
  • docs/USAGE.md: New flag in table, "Mode Flags" subsection, "Clone-Only Mode" workflow section.
  • docs/EXAMPLES.md: Clone-only output examples.

Why not --pull

--pull would only skip cloning missing repos (usually very few). It still requires the GitHub API call for default branch metadata and full per-repo processing — the dominant cost. Net savings: negligible.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits February 25, 2026 00:33
Implements --clone flag that skips processing existing repos (fetch,
dirty check, checkout, pull) and directory auditing. Only clones
missing repositories for faster execution when that's all that's needed.

Does not implement --pull as it would not meaningfully reduce runtime
since it still requires the heaviest operations (per-repo git fetch,
status check, checkout, and pull).

Updates USAGE.md and EXAMPLES.md documentation.

Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Copilot AI changed the title [WIP] Add shortcut commands for cloning and pulling repositories Add --clone flag for clone-only mode Feb 25, 2026
Copilot AI requested a review from JaredHatfield February 25, 2026 00:35
@JaredHatfield JaredHatfield marked this pull request as ready for review February 25, 2026 02:24
@JaredHatfield JaredHatfield merged commit 04cf655 into main Feb 25, 2026
3 checks passed
@JaredHatfield JaredHatfield deleted the copilot/add-shortcut-commands branch February 25, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants