Skip to content

adopt-project.py check: refuse the branch names execute fails on after both legs exist (case, hideRefs, git's own rules) #520

Closed

Description

@brettheap

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

Rides along (backlog; tick it here if the same change covers it)

  • L2-1: check passes an adopt_branch or tracking_branch outside checked_value's alphabet that execute refuses 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-taken compares branch names case-sensitively, so on macOS and Windows a source branch that differs from the split branch only by case passes check, and execute makes 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_asks and _refuse_a_branch_in_the_split_branchs_way), so a branch the repository hides with uploadpack.hideRefs or transfer.hideRefs is not seen: check says plan ok, and execute --local-remote-dir pushes both legs before the split push fails on git's ref lock. Direction: read a local path's branches with git 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-remote prints nothing for a transfer.hideRefs branch that git for-each-ref lists, and execute was not run, there being no git-filter-repo in this container).
— #457, body

L2-1: A residual of #420. Once check asks git about a plan's tracking_branch: and adopt_branch:, execute still also holds both to checked_value's alphabet (scripts/repo_shape.py:94), and git accepts names outside it (a=b, a,b). So check keeps saying plan ok for a plan execute refuses before any leg; plan --tracking-branch a=b already refuses, so only a hand-edited plan reaches it. check should ask checked_value too, as it does for org:. Repro: set tracking_branch: "a=b" in a plan; check --plan exits 0 plan ok, execute --plan --yes --local-remote-dir D exits 2 REFUSED unsafe-value. Seen at main 580d7df.
— #457, comment

Activity

  1. added this to the v1.1.0 milestone on Oct 14, 2026
  2. brettheap commented on Oct 14, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-10-14T22:28:12Z, for #520

    Logged in lanes/log/openRepoShape-1.md at 08f3bc1387f63ea03cdf3ef5c7e3c0441b66af46.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#520:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#520"`, kept where the row or its body names `#520`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `520` as a whole token:
       none
    
  3. added a commit that references this issue on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions