Repository navigation
Description
Goal: every test that gives git a setting through GIT_CONFIG_COUNT builds it with appended_to_command_scope, a hand-worked append is something a test refuses, and a pasted git submodule update --init reads a just-pushed remote the way every other clone of the suite does, or the issue says why it need not.
Filed by lane openRepoShape-5, from the checklist candidates of #758's PR (#818, writer w758: "Left out, and checklist candidates", both bullets). #758 itself is not reopened; these are what its scan and its paste_env left. Tests only. The first and third lines are read from source; none is measured, because no test fails today.
Lands after: lane 5's #758 (PR #818, fix/758-git-command-scope, head b6e15591), stacked on #662 (PR #748, fix/662-insteadof-helper, 8368d1f8). #818 adds the scan this issue's second line is about and the per-call paste_env; appended_to_command_scope is on main (tests/conftest.py:204, from #713). path:line is at main 6626a3c5 for the three sites, and at #818's head b6e15591 for what #818 adds.
Lines
- Three more appends are worked out by hand beside
appended_to_command_scope. w758's candidate 2; each is in a file tests/test_doctor_legs_members_next.py and 24 other files: tests append what they tell git to theGIT_CONFIG_COUNTentries the environment holds, so a pasted line keeps the session's maintenance settings and the Windows job's two (#758) #818's base did not hold, which is why tests:PASTE_ENVintests/test_doctor_legs_members_next.pyis an import-time snapshot that overwritesGIT_CONFIG_COUNT, seven tests hand-build the same append besideappended_to_command_scope, and sixgit clone --no-localcalls buildclone_just_pushed's options by hand #758's second line (seven tests) and tests/test_doctor_legs_members_next.py and 24 other files: tests append what they tell git to theGIT_CONFIG_COUNTentries the environment holds, so a pasted line keeps the session's maintenance settings and the Windows job's two (#758) #818 (25 files) do not carry it. Each takes an environment and returns it with one moreGIT_CONFIG_*entry, counted from the environment's own count, so each is right today:on_disk(tests/test_family_head_lost_gitmodules.py:94-100):index = int(env.get("GIT_CONFIG_COUNT", "0")), thencore.ignorecase;with_config(tests/test_family_bootstrap_gate_order.py:132-137, from 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-membersprints the case-variant move (#648) #682): the same arithmetic for an arbitrary key and value;typed_with_local_remotes(tests/test_family_add_spellings_remedies.py:132-141, from family.py add: amembers/renamed withgit mvis renamed back in two steps through a free name, after what the disk lacks under it is put back, and a printed--sparsesays the git it needs, so no remedy fails as typed (#685) #767):count = int(os.environ.get("GIT_CONFIG_COUNT", "0")), then threemonkeypatch.setenvcalls forprotocol.file.allow.
Direction: one call toappended_to_command_scope(env, [(key, value)])each, as tests/test_doctor_legs_members_next.py and 24 other files: tests append what they tell git to theGIT_CONFIG_COUNTentries the environment holds, so a pasted line keeps the session's maintenance settings and the Windows job's two (#758) #818 does for the seven.typed_with_local_remotesholds amonkeypatch.context(), so it sets each key the helper returns.
- tests/test_doctor_legs_members_next.py and 24 other files: tests append what they tell git to the
GIT_CONFIG_COUNTentries the environment holds, so a pasted line keeps the session's maintenance settings and the Windows job's two (#758) #818's scan does not see an append worked out by hand, by its own design.counts_set_to_a_number(tests/test_no_auto_maintenance.py:372-415atb6e15591) finds aGIT_CONFIG_COUNTset to a number a test writes out, andtest_the_scan_leaves_a_count_that_is_worked_out(:434) pins that{"GIT_CONFIG_COUNT": str(held + 1)}andint(env.get("GIT_CONFIG_COUNT", "0"))are left alone, so the three sites above pass it, and so will the next test that works out its own count. Direction: decide whether it should flag aGIT_CONFIG_COUNTvalue built by arithmetic (astr(...)call or a+) outsidetests/conftest.py. If so,OWN_COUNTS(:338) names the tests that build one on purpose (tests/test_no_auto_maintenance.py,tests/test_adopt_git_reads.pyandtests/test_clone_just_pushed.py, which see that the code under test keeps the entries they hold), and theworked-outcase moves from "left" to "found". If not, say why on the issue and leave the three sites as a sweep with no guard. - A pasted
git submodule update --initstill clones a local path with noinsteadOfrewrite (w758's candidate 1, which is rv662's "build it fromread_through_git"; read from source). tests/test_doctor_legs_members_next.py and 24 other files: tests append what they tell git to theGIT_CONFIG_COUNTentries the environment holds, so a pasted line keeps the session's maintenance settings and the Windows job's two (#758) #818'spaste_env(tests/test_doctor_legs_members_next.py:62-82) gives a pasted line the session's maintenance settings andprotocol.file.allow, which is what tests:PASTE_ENVintests/test_doctor_legs_members_next.pyis an import-time snapshot that overwritesGIT_CONFIG_COUNT, seven tests hand-build the same append besideappended_to_command_scope, and sixgit clone --no-localcalls buildclone_just_pushed's options by hand #758 asks.paste(row, cwd)(:109-117) takes noremotes, so nourl.<file URI>.insteadOfrewrite reachesUPDATE = "submodule update --init --recursive --checkout"(:88) or any other NEXT it pastes. That is the class tests/conftest.py: one helper builds theurl.<base>.insteadOfrewrite thatclone_just_pushedandread_through_giteach build, and the plain-pathgit submodule update --initsites of #554's review use it (#440) #662's second line names for this file's ownsubmodule updatecalls (:631,:987,:1054at its filing, moved ontosubmodule_update_through_gitby tests/conftest.py: one helper builds theurl.<file URI>.insteadOfrewrite thatclone_just_pushed,read_through_gitand the adopt tests'pastedeach built, and the empty-mountsubmodule update --initsites use it (#662) #748), and a row's pasted NEXT is not among them. tests/conftest.py: one helper builds theurl.<base>.insteadOfrewrite thatclone_just_pushedandread_through_giteach build, and the plain-pathgit submodule update --initsites of #554's review use it (#440) #662 itself says that after tests: theholderfixtures copy the family fixture withshutil.copytreewhile git's background gc or maintenance can still be packing it, so a test errors at setup when a loose object vanishes mid-copy (#440's race, through a file copy) #645 automatic maintenance is off in every repository the suite makes, so the rewrite is a second guard here. Direction: decide first whetherpastestill wants it. If so,paste(row, cwd, remotes=None)appendsinsteadof_entries(remotes)(tests/conftest.py:107at tests/conftest.py: one helper builds theurl.<file URI>.insteadOfrewrite thatclone_just_pushed,read_through_gitand the adopt tests'pastedeach built, and the empty-mountsubmodule update --initsites use it (#662) #748's head8368d1f8) throughappended_to_command_scope, and the callers that paste asubmodule updatehand it the session's remotes. Prove it on a pastedsubmodule update --initof an empty mount:GIT_TRACEshowsupload-packandpack-objects, and the clone'soriginkeeps the plain path, as tests/test_doctor_legs_members_next.py and 24 other files: tests append what they tell git to theGIT_CONFIG_COUNTentries the environment holds, so a pasted line keeps the session's maintenance settings and the Windows job's two (#758) #818's body measured for the helper's own clone.
Verify: tests/test_family_head_lost_gitmodules.py, tests/test_family_bootstrap_gate_order.py, tests/test_family_add_spellings_remedies.py, tests/test_no_auto_maintenance.py, tests/test_doctor_legs_members_next.py, tests/test_clone_just_pushed.py and tests/test_repo_hygiene.py pass on Linux. For the first line, the existing tests of each file hold the arithmetic's result; add one case that starts them under GIT_CONFIG_COUNT=2 (the Windows job's two entries) and asserts git config --show-origin --list through the changed helper lists both and the new key, as test_a_pasted_line_keeps_the_entries_the_environment_holds_at_the_call does for paste. For the second line, a mutant that puts one hand-worked append back, caught by the scan. For the third, the GIT_TRACE run above, if the line is taken.
Overlaps. #818 edits tests/test_doctor_legs_members_next.py and tests/test_no_auto_maintenance.py, so this lands after it; #748, #774, #775 and #820 edit tests/test_doctor_legs_members_next.py too, in other hunks. #820 and #822 edit tests/test_family_head_lost_gitmodules.py and tests/test_family_bootstrap_gate_order.py; #828 edits tests/test_family_add_spellings_remedies.py (new in #767, on main). tests/conftest.py is edited by #723, #746, #748, #806, #814 and #818. No pinned file changes.
Parent: #461.
Milestone: v1.1.1. Tests only, no test fails today, and each of the three sites appends correctly to the entries its caller holds.
🤖 Generated with Claude Code
Activity
brettheap commentedon Oct 17, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-17T18:54:23Z, for #835
Logged in
lanes/log/openRepoShape-5.mdat94ff3a89051d53209cbebdcd0a6d6bb0b1788d4c.The three reads (lane-collision-protocol Rule 1):
tests/test_doctor_paste_through_git.py and seven other files: two com…