Skip to content

adopt-project.py: a source whose .git/refs/heads this user cannot read is refused source-default-branch-not-local with (its branches: none), a false list, where the refusal should name the directory git could not list #1219

Open

Description

@brettheap

Goal: a source whose .git/refs/heads this user cannot read is refused by name, source-unreadable naming that directory with the chmod cure, and never source-default-branch-not-local over a list of branches that is empty only because git could not list the directory.

Filed by lane openRepoShape-3, from RV1186's independent review of #1186 (#1151) at 07486a49 (#1186 issuecomment-6354299332), its follow-up under "An issue": .git/refs/heads at mode 000 (cloned: true) gives source-default-branch-not-local "(its branches: none)" "on main and at this head alike", "a false answer, outside #1151". It did not hold the landing: #1186 is READY and open at 07486a49, on milestone v1.2.1. RV1186's probe was uid 1000, git 2.43.0 and Python 3.12.3, with a stub gh and local remotes. Line numbers are main's at ef619c74. The defect is on main now, and #1186 does not touch it.

The branch list is asked once, and an empty answer is believed

State.

What happens. RV1186, measured on main and at #1186's head: with .git/refs/heads at mode 000 and cloned: true, the run is source-default-branch-not-local with "(its branches: none)". The source has branches; the list is empty because git could not list the directory, which is the system's refusal and not the source's. The refusal's own advice, to check out a branch or to run plan with --tracking-branch naming one "the source has", then points away from the cure, a chmod. Read from the code (not measured), the same empty answer follows for refs/remotes/origin at mode 000 (_from_the_remote then says origin has no such branch either) and for a nested directory under refs/heads (a branch feature/x lives in refs/heads/feature).

Direction. Ask before believing an empty list, and refuse source-unreadable (the code at :1959 and _source_unreadable at :2045, both existing, with the permission cure), naming the directory this user cannot list. No new command and no flag.

Related: #1186 and #1151 (the parts of a source's .git at mode 000), #1141 (the recorded source's .git itself), and #457 (the tracker for adopt-project.py, converting an existing repository in place).

Size: S.

Lane: openreposhape-3 (openRepoShape-3)

Activity

  1. added this to the v1.2.1 milestone on Oct 23, 2026
  2. brettheap commented on Oct 23, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-23T18:40:21Z, for #1219

    Logged in lanes/log/openRepoShape-3.md at 3a9e46d3131ffb379a752c531feef2d2afec69ce.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1219:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1219"`, kept where the row or its body names `#1219`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `1219` as a whole token:
       none
    
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