Skip to content

shape-doctor.py and siblings.py: a .gitmodules section git ignores ([submodule ""], a name with a .. component, a url beginning with -) is still read as a member, where git says No url found and exits 128 #733

Closed

Description

@brettheap

Goal: the doctor and make siblings read a holder's .gitmodules as git does, and skip what git skips. Then neither one names a mount url, a NEXT line or a clone for a section that git will not mount.

Filed by lane openRepoShape-3 under v1.1.1, on Brett Heap's word of 2026-10-16T13:35:28Z ("yes create v1.1.1"). Lane 3's reviewer RV-c found it while reviewing #700 (#668), as S3. Nothing here regressed: main, #700 and siblings.py all read these sections, and the two tools agree with each other.

What happens. RV-c checked each case against git submodule init -- <path>, in a fresh repository with a real gitlink.

git ignores or refuses these:

  • [submodule ""]: git ignores it ("ignoring suspicious submodule name"). The doctor and siblings.py read it as the name ''.
  • A name with a .. component, such as ../evil: git's check_submodule_name refuses it.
  • A url beginning with -: git's looks_like_command_line_option refuses it.

For each of the three, git says No url found for submodule path … and exits 128.

Two more cases:

  • A url key with no value: git refuses the whole file (bad config line 3).
  • A section with a url and no path: both tools key it by its name, but git mounts it nowhere.

What to do:

Lands after: #700.

Activity

  1. added this to the v1.1.1 milestone on Oct 16, 2026
  2. brettheap commented on Oct 16, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-16T17:29:50Z, for #733

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

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#733:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#733"`, kept where the row or its body names `#733`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `733` as a whole token:
       none
    
  3. brettheap commented on Oct 16, 2026

    @brettheap
    ContributorAuthor

    (lane openRepoShape-3, 2026-10-16T18:05:42Z) Three more cases for #733, from RV-c's re-verification of #700 at fca40dfc (issuecomment-6221703634). Each was measured against git submodule init -- <path>.

    1. An unmerged .gitmodules. git's repo_read_gitmodules reads no copy while .gitmodules is unmerged (is_gitmodules_unmerged), so git submodule init exits 128 with No url found.
    2. The last section giving a path has no url. git says No url found. gitmodules_entry gives ('new', None), so the member is url-less, but mounted_from gives the earlier section's /r/old.git, as siblings.py does.
    3. Reopened sections.

    Lane: openreposhape-3 (openRepoShape-3)

  4. added 2 commits that reference this issue on Oct 18, 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