Add fetch-all workspace ref refresh command #101

Open
opened 2026-07-14 04:16:35 +01:00 by allod-agent · 1 comment
Member

User story: So that I can inspect current remote files without mutating local checkouts, the workspace tooling needs a read-only fetch-all command that refreshes refs across repositories.

Part of the "Forge / workspace CLI tooling" arc.


Context: pull-all --switch already handles the cleanup case where a repo is clean, fully pushed, and should return to its default branch before pulling. The missing companion is a non-mutating workspace command for refreshing remote refs before inspecting files from origin/HEAD.

Problem: when a repo is on a stale local branch whose upstream was deleted, plain pull-all fails for that repo. An agent can then incorrectly conclude a requested file is missing if it only inspects the stale checkout. A safe fetch-all command would update remote refs across the workspace without checking out branches, merging, or requiring clean worktrees.

Requested shape:

  • Add fetch-all to the workspace tools package.
  • Discover repos the same way as pull-all and work-diff.
  • Run git fetch --all --prune for each repo.
  • Do not switch branches, merge, fast-forward, reset, or require a clean worktree.
  • Preserve parallel execution with PULL_ALL_JOBS or the same concurrency policy as pull-all.
  • Report per-repo status clearly: fetched, up to date, skipped/error with first useful diagnostic.
  • Add help text, workspace README coverage, packaging exposure, and tests.

Relationship: complements #87. That issue can still redesign pull-all around fetch plus fast-forward sync; this issue is for the read-only remote-ref refresh primitive that agents can run before checking origin/HEAD:<path>.

**User story:** So that I can inspect current remote files without mutating local checkouts, the workspace tooling needs a read-only `fetch-all` command that refreshes refs across repositories. _Part of the "Forge / workspace CLI tooling" arc._ --- Context: `pull-all --switch` already handles the cleanup case where a repo is clean, fully pushed, and should return to its default branch before pulling. The missing companion is a non-mutating workspace command for refreshing remote refs before inspecting files from `origin/HEAD`. Problem: when a repo is on a stale local branch whose upstream was deleted, plain `pull-all` fails for that repo. An agent can then incorrectly conclude a requested file is missing if it only inspects the stale checkout. A safe `fetch-all` command would update remote refs across the workspace without checking out branches, merging, or requiring clean worktrees. Requested shape: - Add `fetch-all` to the workspace tools package. - Discover repos the same way as `pull-all` and `work-diff`. - Run `git fetch --all --prune` for each repo. - Do not switch branches, merge, fast-forward, reset, or require a clean worktree. - Preserve parallel execution with `PULL_ALL_JOBS` or the same concurrency policy as `pull-all`. - Report per-repo status clearly: fetched, up to date, skipped/error with first useful diagnostic. - Add help text, workspace README coverage, packaging exposure, and tests. Relationship: complements #87. That issue can still redesign `pull-all` around fetch plus fast-forward sync; this issue is for the read-only remote-ref refresh primitive that agents can run before checking `origin/HEAD:<path>`.
Owner

extract common functions between the pull-all and fetch-all scripts into a library

extract common functions between the `pull-all` and `fetch-all` scripts into a library
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
allod/tools#101
No description provided.