workspace_collect_repos silently skips dot-named repo roots (e.g. Forgejo .profile, GitHub .github) #113
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
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#113
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?
Problem
workspace_collect_reposinlib/workspace.shenumerates checkouts by globbing"$dir"/*/, which does not match leading-dot directory names (bash*skips dotfiles unlessdotglobis set). Bothpull-allandwork-diffbuild their repo list from this one helper, so any checkout whose directory name starts with a dot is silently invisible to both: it is never synced bypull-alland never appears inwork-diff, with no error to explain the omission.Why it matters
Reserved dot-prefixed repository names are a normal part of the Git-forge ecosystem, so downstream adopters will hit this, not only us:
.github— org default community-health files and, viaprofile/README.md, the org profile page..profile— user and org profile README — and.profile-private— the members-only org profile variant.Anyone who checks one of these out on a dev VM to edit it will find it present but never pulled and never shown in
work-diff.Current workaround
The problem can be sidestepped per-repo by decoupling the registry
checkoutfrom theremote: fetch from the.profileremote but check out to a non-hidden path such asorg-profile. That keeps the forge repo name intact — renaming.profilewould break the profile-page feature — while staying visible to the workspace tools, and it works becausebootstrap-vm.shalready treatsremoteandcheckoutas independent. It is per-repo and easy to forget, which is the motivation to handle dot-repos in the collector directly.Proposed fix
Teach
workspace_collect_reposto include dot-named repo roots. Becausepull-allandwork-diffshare this single helper, one fix covers both. Care is needed so the recursion never descends into git internals: enablingdotglob(or adding a"$dir"/.*/glob) must skip.,.., and.git, and a hidden directory should be included only when it is itself a repo root — never recursed into as an intermediate container. A regression test with a.profile-style checkout fixture under a temp workspace would lock the behavior in.Once this lands, any non-hidden-checkout workaround can optionally revert to the real dot name for parity, though it is harmless to leave in place.