This repository was archived by the owner on Dec 3, 2026. It is now read-only.
Repository navigation
feat: meta git clone-missing, clone-prune and clone-sync; tips and warnings where Matt's run went red [[tasks/harmony-3037]] - #157
Merged
Conversation
…rnings where Matt's run went red [[tasks/harmony-3037]] - `meta git clone-missing` clones the projects the .meta.yaml files on disk list that aren't cloned and changes no repo that is (the old `update`). `meta git clone-prune` removes the repos no .meta.yaml lists that hold nothing unpushed (repo_holds, plus no repo inside them), and names each one it keeps with what it holds. `meta git clone-sync` does both. All three use the clone queue and update's discovery, take -r/--depth, --dry-run, --json, --include/--exclude/--tag, and refuse in a worktree set. - A looped command that fails in every repo because the tool rejected one of meta's own options (`meta git pull --recursive`) ends with `tip: --recursive is an option of meta itself: it goes before the command, as in meta --recursive git pull`, read from the tool's error. - In `meta git pull/status/...` a listed project that isn't cloned is a warning naming clone-missing, not a failure (an error with --strict); `meta exec` still fails there. - `meta git update` counts its progress to the repos the .meta.yaml files list ([1/7] ... [7/7]), and says an unlisted repo short: `x isn't in .meta.yaml (nothing unpushed; meta git clone-prune removes it)`. - README and skills list update, clone-missing, clone-prune and clone-sync.
- clone-prune keeps a leftover holding a bare repository too, and says "removed only in part" (exit 1) when a removal fails midway. - --include/--exclude/--tag with a command's own -r is refused: meta chose the selection without the nested projects; -r goes to meta. - The tip reads only the tool's own error, so `meta --sequential git status -s --no-such-option` gives none; it also reads git's `unrecognized argument: --json` and `--option=value`. - --json names a failed clone and a refused folder by their paths. - update's leftover warning names `meta -r git clone-prune` after -r; the remaining hints and the FAQ name clone-missing for cloning. - Tests: an uncloned project during a real pull, the tip cases, the bare repo, the -r refusal, JSON paths.
This was referenced Nov 3, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Task: [[tasks/harmony-3037]]. Matt used the new meta on 2026-11-02 and hit three things: the change in
meta git update(#151),meta git pull --recursivefailing with git's usage text in every repo, andmeta -r git pullending red over projects not cloned yet. This is the first step the owner and Matt agreed: no change to the plugin model,updatestays as #151 made it.What changes for users
meta git updategit pull --ff-only), clone the missing ones (unchanged)meta git clone-missing.meta.yamlfiles on disk list that aren't cloned; change no repo that is (no pull, fetch or checkout)meta git clone-prune.meta.yamllists that hold nothing unpushed; keep and name the othersmeta git clone-syncclone-missing, thenclone-pruneAll three new commands take
-r(or meta's--recursive) and--depththe wayupdate -rdoes,--dry-run,--json({"dry_run", "repos": [{"path", "action", "reason"?}]},actionbeingcloned,removed,keptorfailed), and--include/--exclude/--tag(the projects cloned, and the meta repos searched for leftovers; with a selection,-rgoes to meta,meta -r --include x git clone-missing, because meta makes the selection before the command runs). They refuse inside a worktree set, asupdatedoes. They're in meta-git's plugin info,meta git --helpand their own--help.clone-prune deletes a repo only when all of these hold, and otherwise keeps it and says why:
.meta.yamlread lists it or a project inside it;meta_git_lib::worktree::safety::repo_holdsfinds nothing: no uncommitted or untracked files, stashes, commits on no remote, linked worktrees;repo_holdsdoesn't see them, so deleting it would delete their unpushed work too.A removal that fails midway is reported as
Not removed x: it was removed only in part (…), asfailedin the JSON, and makes the command exit 1.Ignored files are not checked (decision 3 defines "holds nothing" by
repo_holds). See "Choices left to the owner".Before / after
meta git pull --recursive(git rejects--recursivein every repo):Summary: ✗ 3 out of 3 commands failed.tip: --recursive is an option of meta itself: it goes before the command, as in meta --recursive git pullmeta reads this only from the tool's own error: git's
unknown option `recursive',unknown switch `r'andunrecognized argument: --json, clap'sunexpected argument '--x', GNU'sunrecognized option '--x', and the--x=valueform of each. The command still runs exactly as typed (#148), and the tip shows only when every repo failed. With--sequential, meta doesn't capture the output, so no tip is shown: the exit code alone can't tell which option was rejected (git status -s --no-such-optionexits 129 too, and-sis also one of meta's options).meta -r git pullwith a project not cloned yet:✗ group-b/b2: not cloned (run 'meta git update'), counted as a failed command, exit 1.warning: group-b/b2 is not cloned;meta git clone-missingclones it, then the pulls; exit 0 when they all worked.--strictmakes it an error.meta execstill fails there, now namingmeta git clone-missing.meta git updateprogress:[1/1] Pulled open-source (+17 nested), then[2/18] …[1/7]…[7/7], the workspace first. The total is the repos the.meta.yamlfiles on disk list, and it grows only if a pull adds projects.meta git update, for a repo no.meta.yamllists:warning: swe-marathon-bench is not in .meta.yaml; it has no uncommitted or untracked files, stashes, worktrees, or commits on a branch, tag or HEAD that its remote branches lack (ignored files and the reflog not checked)warning: swe-marathon-bench isn't in .meta.yaml (nothing unpushed; meta git clone-prune removes it). When it holds work:warning: frontend isn't in .meta.yaml; it holds 1 file untracked: scratch.txt; 1 commit on no remote: …, with no mention of prune. Afterupdate -rit namesmeta -r git clone-prune.make build-plugins: no change. On main the binaries aremeta-git,meta-projectandmeta-cargo(meta_rust_cli/Cargo.tomlnames itmeta-cargosince #144), and those are the names the Makefile copies. If Matt saw a failure there, it came from something else; I didn't reproduce one.Docs: README and the
meta-git/meta-pluginsskills get the table above; the FAQ andmeta projecthints that told people to clone withmeta git updatenow namemeta git clone-missing. No doc in this repo saysmeta git pull --recursive(grep finds none); it came from #135's PR text, which isn't in the repo.Internals
CloneQueue(meta_git_lib) records leftovers for every.meta.yamlit reads, not only when pulling, and drops one that another.meta.yamllists or that holds a listed project (libsaroundlibs/x). New:only(dirs)(a selection),expect(n)/found()(progress total). Repos entered as already cloned no longer count as tasks.Outcome.clonedis now the list of folders cloned.update.rssharesworkspace()(the worktree-set refusal),run()(SSH masters and the worker pool) andLeftover::of(the one judgement used by update's warning and by prune) with the newclone_missing.rs.loop_lib::Outer: the calling program's name and options, which meta builds from its own clap definition (Cli::command()), so the option list isn't written out twice.Verified
cargo nextest run --workspace: 630/630.cargo clippy --workspace --all-targetsclean.git exec dry_run project_list help url_credentials: 226/226. New tests intests/git.bats:origin/mainand a dirty file unchanged);-r;--json), and refuses in a worktree set;--jsonnames a failed clone and a refused folder by their paths;--recursive,--tag=v1andgit log --json, and not for--no-such-option,-s --no-such-optionor a failed checkout;meta git pullis warned about once, the real pull advances, exit 0; it is an error under--strictand a failure inmeta exec.HOME,XDG_*,GIT_CONFIG_GLOBAL,META_DATA_DIR, local bare remotes), shaped like harmony: a root, two group meta repos, nested projects,group-b/b2missing, a clean leftover and one with an unpushed commit. One pass:(
clone-syncran afterb2was deleted again and the clean leftover re-cloned. The progress bars are on stderr and don't show off a terminal; on a pty,update -rshows[1/7]…[7/7].)Review
Round 1 at
1bff5b3. Opus (simplicity, user-facing, correctness): yes. Codex Sol (correctness, data safety): no, with 5 blocking findings, all fixed in85eec86: a bare repo inside a leftover, a selection with the command's own-r, the--sequentialtip guess, JSON paths for failures, a test of a real pull. From Opus's notes I also took: a partial removal is reported as such, the update hint carries-r, git'sunrecognized argumentform, and the clone hints in the FAQ andmeta project. CodeRabbit:--option=valuein the tip, fixed.Not verified
std::fs::remove_dir_allremoving git's read-only pack files.make build-plugins: not run (release build); the names were checked against the[[bin]]entries.Choices left to the owner
.env, build output), as decision 3 says. Checking them would keep nearly every repo that has ever been built.Try it
The sandbox scripts are in the owner's notes; this builds the PR head in a worktree of its own and runs the pass above: