Repository navigation
adopt-project.py check: refuse the branch names execute fails on after both legs exist (case, hideRefs, git's own rules) #520
Description
check passes each of these branch names, and execute then fails on it after both leg repositories exist. Make check ask what execute will meet, so each one is refused before any leg is created.
From the v1.1.0 triage of the v1.0.0 known limits on #457. One pull request covers the lines below.
Lines
- A4:
plan-split-branch-takencompares case-sensitively, so a branch differing only by case passescheckand fails after both legs. Where: adopt-project.py_in_the_way. Effort S; macOS, Windows. On main3121945:_in_the_way(adopt-project.py:4859) still compares with==andstartswith, no casefold. (source) -
_branches_atlists a local repository withls-remote, missinghideRefsbranches;checkok, split push fails after legs. Where: adopt-project.py_branches_at. Effort S; all. On main3121945:_branches_at(adopt-project.py:4845) still runsgit ls-remote --heads. (source) - adopt-project.py:
--tracking-branchand the plan'stracking_branch:andadopt_branch:are held only tochecked_value's alphabet and never asked of git, so a name git refuses (~,a..b,x.lock, a trailing/) passesplanandcheckandexecutedies at the first git command that takes it, after a leg repository exists (git init --bare -b,git checkout -B, or a push to GitHub after bothgh repo createcalls), and the corrected plan is then refusedleg-remote-exists#420 (what remains of it: the plan'sadopt_branch:)
Rides along (backlog; tick it here if the same change covers it)
- L2-1:
checkpasses anadopt_branchortracking_branchoutsidechecked_value's alphabet thatexecuterefuses before any leg (source)
Each line above is marked → this issue on its tracking issue. Tick it there too when this closes.
The lines as written on the tracking issues
A4: #382's
plan-split-branch-takencompares branch names case-sensitively, so on macOS and Windows a source branch that differs from the split branch only by case passescheck, andexecutemakes both legs before git refuses. Ruled 2026-10-12: compare case-folded on every OS.
— #457, body
adopt-project.py reads the branches of a local source or assembly with
git ls-remote(_branches_at, adopt-project.py:3830, called at :3974, :4028 and :4034 by #382's_places_check_asksand_refuse_a_branch_in_the_split_branchs_way), so a branch the repository hides withuploadpack.hideRefsortransfer.hideRefsis not seen:checksaysplan ok, andexecute --local-remote-dirpushes both legs before the split push fails on git's ref lock. Direction: read a local path's branches withgit for-each-ref. From the review of #382 (codex at 5a1ffd5, confirmed by an independent verification; here only the git side was re-checked:git ls-remoteprints nothing for atransfer.hideRefsbranch thatgit for-each-reflists, andexecutewas not run, there being nogit-filter-repoin this container).
— #457, body
L2-1: A residual of #420. Once
checkasks git about a plan'stracking_branch:andadopt_branch:,executestill also holds both tochecked_value's alphabet (scripts/repo_shape.py:94), and git accepts names outside it (a=b,a,b). Socheckkeeps sayingplan okfor a planexecuterefuses before any leg;plan --tracking-branch a=balready refuses, so only a hand-edited plan reaches it.checkshould askchecked_valuetoo, as it does fororg:. Repro: settracking_branch: "a=b"in a plan;check --planexits 0plan ok,execute --plan --yes --local-remote-dir Dexits 2REFUSED unsafe-value. Seen at main 580d7df.
— #457, comment
Activity
brettheap commentedon Oct 14, 2026
CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-10-14T22:28:12Z, for #520
Logged in
lanes/log/openRepoShape-1.mdat08f3bc1387f63ea03cdf3ef5c7e3c0441b66af46.The three reads (lane-collision-protocol Rule 1):
Merge origin/main (2989b4c) into fix/520-adopt-check-branch-names
adopt-project.py: `check` finds, and `execute` refuses before any leg…
Merge origin/main (de428f5) into fix/530-adopt-nested-gitattributes
Merge origin/main (de428f5) into fix/418-adopt-submodule-url-answers
Merge origin/main (4cf5fb0) into l3-563-docs
docs/release-notes/v1.1.0.md: refreshed at main 4cf5fb0 (49 pull requ…