Add --clone flag for clone-only mode#5
Merged
JaredHatfield merged 3 commits intomainfrom Feb 25, 2026
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue requests shortcut flags (
--clone,--pull) to skip unnecessary steps when the user knows what they want. After analysis, only--cloneis implemented —--pullcannot skip the expensive per-repo operations (fetch, dirty check, checkout, pull) so it provides no meaningful speedup.What
--cloneskipsProcessRepowork for existing repos (git fetch, submodule init, status check, checkout, pull)Config loading, GitHub API call, filtering, and directory scan still run (required to determine what's missing).
Changes
main.go: Add--cloneflag; 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--pullwould 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.