Skip to content

validate-family.py: the check for values git dies on never reads the index's .gitmodules where the work tree's is on disk, an index blob with a line git cannot parse after a value is family ok, and an unmerged .gitmodules is read as the work tree's or HEAD's where git reads no file (follow-ups from RV1124's review of #1124) #1150

Closed

Description

@brettheap

(lane openRepoShape-4, 2026-10-22T12:26:09Z)

These are three follow-ups from RV1124's independent review of PR #1124 at 672845cc (the fix for #1077): pull/1124#issuecomment-6321372469. RV1124 graded each a NIT and measured each older than #1124. #1124's own fix round takes S1, N3, N4 and N5. N1, N2 and N6 are outside it, so they are filed here. Measured with git 2.43.0 on a scratch merge of main 4ed7c7bf and #1124, in scratch repositories with gitlinks at members/W, members/I and members/H. The file is templates/family-root/scripts/validate-family.py.

  1. Where the work tree's .gitmodules is on disk, the check for values git dies on never reads the index's: a value in both gets an unset line with no stage line, so a plain git commit after it records the index's copy in HEAD, and a value in the index alone is family ok (RV1124's N1; pre-existing, and self-correcting, because the next gate run names it).

    • P1 setup: update = !true in IRRS's section, in the work tree's file on disk and staged. HEAD's file does not give it.
    • Round 1 prints only git config -f .gitmodules --unset-all submodule.members/IRRS.update, with no stage word. After that line and a plain git commit:
      • HEAD gives !true;
      • a plain clone's git submodule update --init --recursive exits 128 (fatal: invalid value for 'submodule.members/IRRS.update');
      • the next gate run says "in HEAD ... Stage and commit the work tree's .gitmodules".
    • Main's script prints the same text and gives the same result, so this is not a regression. CI's gate would refuse such a commit.
    • P1b, a sibling: the index alone gives the value, and the work tree's file is clean on disk. The gate is family ok in --no-members (exit 0), and a plain commit records the value in HEAD.
    • Fix: where the work tree's file is on disk, read the index's too (_blob_listed(root, ":.gitmodules")). Where the index's gives the value, end the lines with git add -- .gitmodules and say "then stage" (or "then stage and commit" where HEAD gives it). Printing the stage line as a line, as _section_out now does, would also give N2's "then stage" a line to type.
  2. An index blob with a line git cannot parse, after a value, is family ok (RV1124's N2; pre-existing).

  3. An unmerged .gitmodules is read as the work tree's or HEAD's, where git reads no file (RV1124's N6; pre-existing, and v1.1.1's release notes already list the unmerged case as a known limit).

Lane: openreposhape-4 (openRepoShape-4)

Activity

  1. brettheap commented on Oct 22, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-22T20:03:35Z, for #1150

    Logged in lanes/log/openRepoShape-5.md at 231bfe046a2428b5106265d6ee021a1c29f8e262.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1150:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1150"`, kept where the row or its body names `#1150`:
    1124	validate-family.py: `gitmodules-path-twice` and the check for values git dies on read the `.gitmodules` git reads, the index's where the work tree's is gone, and every section's lines end `git add -- .gitmodules`, so a plain `git commit` after them takes the section out of HEAD (#1077)	fix/1077-gitmodules-checks-read-the-file-git-reads	OPEN
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1150` as a whole token:
       none
    
  2. added this to the v1.2.1 milestone on Oct 23, 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