Skip to content

bootstrap.py and validate-family.py: a .gitmodules value git dies on while reading the file fails make bootstrap naming the key, and the family gate names it, so update = None no longer ends family bootstrap ok (#648) #768

Closed

Description

@brettheap

Goal: where git 2.43 dies reading a family holder's .gitmodules, before it checks out any member, make bootstrap fails and names the key and its value, and validate-family.py names the same key in every mode, so neither one says ok over a file git refuses.

Filed by lane openRepoShape-5, from #682's fix round 2 (its body's candidate 6; writer w648c, measured with git 2.43.0 against git's own source at v2.43.0) and rv648's verify of 23e1105, which found the form a person can reach by a typo: update = None for N1's update = none, as git config -f .gitmodules submodule.<name>.update None writes it. Lane 5's coordinator placed it in v1.1.1.

Lines (path:line at #682's head f74f640c; both scripts are the family root's pinned copies, under templates/family-root/scripts/)

  • Bootstrap says ok where git dies reading the file. gitmodules_sections (templates/family-root/scripts/bootstrap.py:263) lists the file with git config -z --file .gitmodules --list (:296), which reads every one of these without complaint. has_url (:340) and init_stop (:350) then find a url for every row, so each row git left not checked out is the missing credential's skip, and the run ends family bootstrap ok, exit 0. Measured in a plain clone, with Nova's section given one more line (w648c's p12.sh, every column; rv648's p11.sh measured git and bootstrap, not the gate, for update = None):

    line added to Nova's section git's submodule update --init --recursive bootstrap gate, members and --pins gate, --no-members
    update = None 128, invalid value for 'submodule.members/Nova.update' ok, exit 0 2, member-uninitialized for Atlas family ok
    update = !true 128, the same ok the same family ok
    url (no value) 128, missing value for 'submodule.members/Nova.url', bad config line 7 in file .gitmodules ok the same family ok
    update (no value) 128, the same for update ok the same family ok
    ignore (no value) 128, the same for ignore ok the same family ok
    shallow = maybe 128, bad boolean config value 'maybe' for 'submodule.members/Nova.shallow' ok the same family ok
    fetchRecurseSubmodules = bogus 128, bad submodule.members/Nova.fetchrecursesubmodules argument: bogus ok the same family ok

    A path with no value dies the same way (bad config line). Git's rules are parse_config in submodule-config.c at v2.43.0: config_error_nonbool for a path, ignore, url or update with no value (:448, :474, :490, :502), which config.c turns into bad config line and a die for a file (:1130, :1150); die(_("invalid value for '%s'")) for an update other than none, checkout, rebase or merge, a !command included (:510; submodule.c:392-406, case-sensitive); git_config_bool for shallow (:517), which dies on a value that is no boolean or number; and parse_fetch_recurse(..., die_on_error) for fetchRecurseSubmodules (:469-471, the die at :301), which takes a boolean or on-demand. An ignore value it does not know is a warning only (:479-482).

    Direction: gitmodules_sections checks each submodule.* entry it lists against those rules. Where one would make git die, it returns that entry and no sections, as it returns unmerged (bootstrap.py and validate-family.py: a member no credential would check out fails the family bootstrap, every row's gitlink is asked before any checkout, and --no-members prints the case-variant move (#648) #682's round 3), and unfetchable asks it first, beside unmerged: every row not checked out gets one reason, such as "git cannot read .gitmodules: submodule.<name>.<key> <has no value | is <value>>". The line's cure names the key: set it to a value git takes (for update, one of none, checkout, rebase, merge), or take it out, and commit .gitmodules. As for every other reason, the holder's records decide, never git's stderr.

  • The family gate names none of these. _gitmodules_sections (templates/family-root/scripts/validate-family.py:977) and _head_gitmodules (:1030) read the work tree's file and HEAD's the same way (_sections_listed, :1015). Measured in every state above: members checked and --pins refuse member-uninitialized for the first row (:579), whose remedy is the same git submodule update --init --recursive that dies; --no-members says family ok. Direction: fix it in the same change. A finding, say gitmodules-value-refused, for each such entry in the work tree's .gitmodules and in HEAD's (HEAD's as member-gitmodules-absent reads it), asked before any member check and under --no-members too, since it needs no member. Its remedy prints git config -f .gitmodules --unset-all submodule.<name>.<key>, one command to a line as gitmodules-path-unnamed prints them, says which values git takes, and ends with the commit.

  • What bootstrap.py and validate-family.py: a member no credential would check out fails the family bootstrap, every row's gitlink is asked before any checkout, and --no-members prints the case-variant move (#648) #682 left approximate in bootstrap (its body's "Not changed"):

    • Where git reads the file from. Git reads the work tree's .gitmodules; where the work tree has none, the index's, then HEAD's (submodule-config.c:660-664); and none while a merge leaves it unmerged (:703, which bootstrap.py and validate-family.py: a member no credential would check out fails the family bootstrap, every row's gitlink is asked before any checkout, and --no-members prints the case-variant move (#648) #682's round 3 follows). gitmodules_sections reads the work tree's alone (bootstrap.py:293). So where the work tree lacks the file while the index or HEAD holds it (a deletion not yet committed, or a sparse checkout that leaves it out), every row git left not checked out is "no section of .gitmodules gives that path", and the run fails even where a credential was all git lacked. Direction: where the work tree has no .gitmodules, list the index's (:.gitmodules), then HEAD's, with git config --blob, as git does.
    • submodule.<name>.active. Where submodule.active is set, git asks a member's own active key first (submodule.c:278). init_stop asks neither (bootstrap.py:374). Direction: read submodule.<name>.active from submodule_config as a boolean, before the pathspecs.
    • submodule.active's pathspecs. init_stop takes the key's presence (bootstrap.py:374), not its patterns (submodule.c:286-298). Under a subset clone's members/Atlas, a member outside the subset whose section has no url counts as a stop, though git's init skips it. It is reached only where git also fails for another reason, and then the line names a real defect. Direction: match the plain path patterns git clone --recurse-submodules=<path> writes (a path, or a leading directory of one), and keep today's reading for a pattern with pathspec magic or a glob.

Verify: a parametrized test beside #682's tests/test_family_bootstrap_gate_order.py, one case per line in the table, update = None first, each in a plain clone with the credential: git's update exits 128; bootstrap exits 1, names every row with the new reason and the key, and its last two stderr lines are exact; the entry fixed as the line says and committed, the same run ends ok. The same states for the gate: the new finding in all three modes, exit 1, its printed commands typed, then family ok in every mode. A no-misfire case each for update = none, update = checkout, shallow = true, fetchRecurseSubmodules = on-demand and ignore = bogus: bootstrap's run and the gate as for a good holder. For the fallback, a plain clone whose work tree lost .gitmodules uncommitted, with no credential: the skip, ok. For submodule.<name>.active, a subset clone with submodule.members/<P>.active=false set for a member in the subset. Run tests/test_family_bootstrap_gate_order.py, tests/test_validate_family_unnamed_mounts.py, tests/test_family_head_lost_gitmodules.py, tests/test_doctor_legs_members_next.py and test_family.py's three bootstrap tests, on Linux.

Overlaps. #682 (fix/648-bootstrap-and-gate-order, f74f640) adds the gitmodules_sections, has_url, init_stop and unfetchable this builds on: start after it lands. #745 (fix/704-bootstrap-leg-moves) and #747 (fix/681-validate-family-remedies) are stacked on #682 and edit the same two files. Lane 4's fix/690-siblings-inputs edits templates/family-root/scripts/siblings.py, whose submodule_urls (:226 at f74f640) lists .gitmodules with git config -f --list too; it is not part of this issue. Both scripts here are pinned copies: each holder sees them as upstream-changed, and they are re-pinned in the next shape bump. No README or handbook sentence is made false.

Milestone: v1.1.1. No tool here writes any of these values: each needs a hand edit or a typo such as None (a merge can carry such a value in from another branch, but does not make one; a merge that leaves conflict markers makes git config --file fail, which fails the run rather than ending ok). Git refuses the file loudly, and make bootstrap prints git's fatal: line above the ok, so a person sees that something is wrong; the fault is that the run still says ok.

Activity

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

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-17T10:29:13Z, for #768

    Logged in lanes/log/openRepoShape-5.md at 3c097bf5d74dc3981be1dc9eb5f85a934d43aa87.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#768:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#768"`, kept where the row or its body names `#768`:
    682	bootstrap.py and validate-family.py: a member no credential would check out fails the family bootstrap, every row's gitlink is asked before any checkout, and `--no-members` prints the case-variant move (#648)	fix/648-bootstrap-and-gate-order	OPEN
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `768` 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