Checkout walkers skip a host-provided checkout, recognized by having no origin #268
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#268
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
pull-allandflake-update-cascadetreat a checkout under~/workthat has nooriginremote as host-provided and skip it with a named reason, instead of failing on it.Part of allod/strategy#62.
Primary goals:
git remoteoutput names nooriginis host-provided. That is the contract the hypervisor's injection step establishes (allod/nexus#73:git initplus a push, never a clone), so no registry field or config is consulted and nothing has to be kept in sync.pull-allreports it as skipped — today a host-provided checkout printserror [pull failed: There is no tracking information for the current branch.]; it printsskipped [host-provided: no origin]instead, and the exit status is unaffected either way.flake-update-cascadeleaves it alone — a no-origin checkout is dropped from the repository set before any default-branch or forge-name lookup and named once in the output as skipped, so a run no longer reports it as "not on default branch" or fails its forge-name resolution.lib/workspace.shgainsworkspace_repo_is_host_provided <dir>andcmd/flake-update-cascade/workspace.gomirrors it, the same waydefaultBranchmirrorsworkspace_repo_default_branch.Current state and specifics
lib/workspace.shworkspace_collect_reposenumerates every repository root underWORK_DIRwith no remote check, andworkspace_repo_default_branchfails on a repo withoutorigin/HEAD.workspace/pull-allprocess_reporunsgit pullon every collected repo and turns the failure into anerrorrow.cmd/flake-update-cascade/workspace.gorepoForgeNameanddefaultBranchboth readoriginand report false without it, whichmain.gosurfaces as a per-repo error rather than a skip.work-diffalready renders such a checkout and needs no change;flake-statusskips a checkout with noflake.lock, which a memory checkout never carries, so it needs no change either.Scope
In scope:
lib/workspace.sh,workspace/pull-all,cmd/flake-update-cascade/workspace.goandmain.go, with cases intests/workspace/pull-all.shandcmd/flake-update-cascade/main_test.go. Tracked elsewhere:allod change cleanup's unpushed-commit guard answering "nothing unpushed" on a repo with no remote base (allod/tools#127), the injection step itself (allod/nexus#73), and the inventory marker (the allod/inventory child of allod/strategy#62).