Artifact 0c705f0df20ba7e185bb478ef67c5580d1c3b833754c35daf0db95260691a4d3:
- File
src/main.zig
-
2026-07-20 02:24:57
— part of check-in
[8e2c31c8ba]
on branch s4-history
— Extract read/history verb family into src/cmd/history.zig (S4)
Move the read-only inspection verbs — stat, log, leaves, timeline, branch, tag, info, ls, cat, artifact, annotate — together with the name-resolution and rendering helpers private to them out of src/main.zig into the new src/cmd/history.zig, mirroring the S2 sync and S3 tracking extractions.
Pure behaviour-preserving move: every relocated declaration is byte-identical to its main.zig source. The only changes are the new import prologue and the pub forced on the eleven dispatch-called handlers. Helpers shared with the still-in-main checkout verbs (repoReadFail, openRepo, reasonOf, firstCommentLine, renderBranchList, lessByHash, mintControlArtifact, and the per-verb help strings) stay pub in main.zig and are aliased back in the prologue.
The extraction is non-contiguous: the checkout family — update, bisect, merge, revert, undo, redo, commit, amend — is interleaved among the moved verbs and is left exactly in place.
main.zig keeps the verb-dispatch switch, now calling cmd_history.runStat and its siblings; its test root imports the new file so the moved inline test keeps running. (user: dmestas, size: 219297) [annotate] [blame] [check-ins using]
-
2026-07-20 02:33:28
— part of check-in
[3bbc572acd]
on branch trunk
— Merge s4-history: extract the read verb family into src/cmd/history.zig
Third of four family extractions. A pure behaviour-preserving move: the read surface -- stat, log, leaves, timeline, branch, tag, info, ls, cat, artifact, annotate -- and the name-resolution and rendering helpers private to it move verbatim into src/cmd/history.zig, byte-identical to their source but for the pub the dispatch switch forces on the eleven handlers. The extraction is non-contiguous: the mutating checkout verbs interleave with the read verbs in the file and stay exactly in place. repoReadFail stays pub in main.zig because the sync family calls it, so moving it would cross cmd boundaries. Shared helpers stay pub and aliased so moved bodies read unchanged. No helper duplicated, no cross-cmd import, test count unchanged. (user: dmestas, size: 219297) [annotate] [blame] [check-ins using]
-
2026-07-20 02:24:57
— part of check-in
[8e2c31c8ba]
on branch s4-history
— Extract read/history verb family into src/cmd/history.zig (S4)