Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2bf402d
shape-doctor.py: a validator that crashed says it crashed instead of …
brettheap Oct 12, 2026
8ad856f
shape-doctor.py: the CANNOT ANSWER block prints `Remediation:` only f…
brettheap Oct 12, 2026
52e3eee
shape-doctor.py: a NEXT is only the command, and the sentence that en…
brettheap Oct 12, 2026
2ea9a1f
Merge origin/main (doctor A, #354) into fix/doctor-validator-cannot-run
brettheap Oct 12, 2026
7158914
shape-doctor.py: the `legs` and `members` lockstep line is withheld w…
brettheap Oct 12, 2026
e44d860
Merge branch 'main' into fix/doctor-validator-cannot-run
brettheap Oct 12, 2026
44216cb
Merge #357's head e44d860 (fix/doctor-validator-cannot-run) into fix/…
Oct 12, 2026
7b31d82
Merge origin/main 45e01f4 into fix/doctor-next-is-only-a-command, aft…
Oct 12, 2026
36321c4
shape-doctor.py: doctor B's crash line and `repo_shape.py` restore li…
Oct 12, 2026
9cc4a49
Merge origin/main 53bee5b into fix/doctor-next-is-only-a-command, aft…
Oct 12, 2026
55723be
tests/test_doctor_next_is_a_command.py: the module docstring counts t…
Oct 12, 2026
d1c2f30
Merge origin/main 245d775 into fix/doctor-next-is-only-a-command, aft…
Oct 12, 2026
9c8d8d5
shape-doctor.py: lane 2's five NEXT tails from #267, `pin_restore`'s …
Oct 12, 2026
8eb2163
Merge branch 'main' into fix/doctor-next-is-only-a-command
brettheap Oct 12, 2026
c169a2d
Merge branch 'main' into fix/doctor-next-is-only-a-command
brettheap Oct 12, 2026
b16e46f
Merge origin/main cc8f2da into fix/doctor-next-is-only-a-command, aft…
Oct 13, 2026
6aead9c
shape-doctor.py: lane 2's four NEXT tails from #291, `pin_restore`'s …
Oct 13, 2026
131caeb
tests/test_update_shape_next_quoting.py: the #325 test of the doctor'…
Oct 13, 2026
0066e2b
Merge origin/main fc48854 into fix/doctor-next-is-only-a-command, aft…
Oct 13, 2026
a841533
tests: lane 2's #496 helpers read the conflicted shape pin's sentence…
Oct 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
486 changes: 291 additions & 195 deletions shape-doctor.py

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions tests/test_doctor_legs_members_next.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
submodule URL by default -- and never `GIT_ALLOW_PROTOCOL`, which would
override git's `user` policy for the whole run.

WHAT IS ASSERTED IS WHAT THE COMMAND DOES, and the explanation after it is
WHAT IS ASSERTED IS WHAT THE COMMAND DOES, and the explanation beside it is
read through `why_of` alone, so that moving the ` # ` tail into a field of
its own (#277) changes one helper here and not every test.
its own (#277) changed one helper here and not every test.

The fixtures are `test_shape_doctor`'s, imported rather than rebuilt: a
project or a holder made any other way would be a different one.
Expand Down Expand Up @@ -66,9 +66,6 @@
"GIT_CONFIG_VALUE_0": "always",
"PYTHONDONTWRITEBYTECODE": "1"}

#: The three characters between a NEXT's command and its explanation.
TAIL = " # "

#: The git line's own words after `git -C <root>`: `--init` for a mount the
#: clone never registered, `--recursive` for a member's own legs, and
#: `--checkout` so that a configured `submodule.<name>.update` (rebase, merge,
Expand All @@ -79,14 +76,15 @@
# --- reading a row ----------------------------------------------------------

def command_of(row: dict) -> str:
"""The command a row hands over, without its explanation."""
return (row["next"] or "").partition(TAIL)[0]
"""The command a row hands over: its NEXT, which is only the command
(#277)."""
return row["next"] or ""


def why_of(row: dict) -> str:
"""The sentence that explains the command: today the ` # ` tail, and
the row's own `why` once #277 moves it there."""
return row.get("why") or (row["next"] or "").partition(TAIL)[2]
"""The sentence that explains the command: the row's own `why`, which
used to be the NEXT's ` # ` tail (#277)."""
return row["why"] or ""


def row_of(standard: Path, root: Path, row_id: str) -> dict:
Expand Down
Loading
Loading