summaryrefslogtreecommitdiff
path: root/core/builtins.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-23 15:10:44 -0300
committerGabriel Schneider <[email protected]>2026-11-23 15:38:37 -0300
commit3e60c54651f10fe9233a40bc1f1fdaed141d2116 (patch)
treed6023a7f7e1bc02319e7f9bf75b76e4eed90517d /core/builtins.zig
parent0e2012de121a9735d3c2ab7871a04d144636b849 (diff)
parentf34d3a74cc4a6b735c98ce98cef0df42bd065e67 (diff)
downloadpardes-3e60c54651f10fe9233a40bc1f1fdaed141d2116.tar.gz
pardes-3e60c54651f10fe9233a40bc1f1fdaed141d2116.zip
merge: the Changes layer as the pane's read-only text (pardes-m64-base: round 8's two changes on pardes-merge63c) and Compare (pardes-merge64: `ntlsszul`, `qkksrtsn`), resolved by function: `pinWord` (Compare's road for both words) keeps round 8's `setLanes` (the layer the pane's: shown or hidden in every view of it), `pinAnswer` parses the file's text (`File.fileText`) and names its kind's word in every notice, `describe` gives a pair its row whole (no author; `fitted` gone with round 8's cut) and returns where an author would start, `isPair` kept beside it, `lookGhost` reads a description line as round 8 does (a buffer line, `readOnlyRow`) and opens a pair's patch by its row's first word (`from..to`), hunks.zig `word` tries a pair then a change (`diffChange(.., false)`) and keeps round 8's revset word at no such file, its doc saying both; round 8's rule made Compare's (the coordinator's 15:10: "a pair is ahead when its FROM point's text is the shown one"): `pairRuns` finds where the revision shown stands among the points (an empty `jj diff --from POINT --to REV`: the last point first, the one diff already run; then from the first), marks every pair from there on `a` (pinned, ahead) or `d`, and adds the step from the last point to the revision shown only when no point's text is the shown one; `pairOwners` skips a step ahead (it wrote none of the shown lines); the test marked ROUND 8 ("Compare in a revision's pane at its middle point ...") now wants the second pair ahead (`d();` the text's, going; `d2();` and `e();` read-only lines after it; its row after them) and passes; the first Compare test's `]g` wants each run's first line, a layer's line among them (rows 2 and 6, where ghost rows were no lines: 2 and 3); the guide's *Points.* paragraph says a middle point's pairs as built, the cheatsheet's and the guide's table rows both sides', `pinWord`'s and Compare's docs (builtins.zig, both JSON lists) "in every view of it"; core-test filtered on jj (Debug tui): 54/54 with the next changes' tests left out
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/builtins.zig')
-rw-r--r--core/builtins.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/builtins.zig b/core/builtins.zig
index 7bdb773f..9649d7b8 100644
--- a/core/builtins.zig
+++ b/core/builtins.zig
@@ -1086,6 +1086,12 @@ pub const Changes = struct {
pub const run = @import("jj.zig").changesWord;
};
+/// Pin on a file's pane the file's whole difference between each two of `points` (jj revisions, a blank between, two or more) as one change, however many changes lie between them, and show them in every view of it as `Changes` shows a change: a lane each, the lines it wrote and took away, its row `from..to N changes dates` after its last line; bare, as bare `Changes`.
+pub const Compare = struct {
+ pub const takes_arg = true;
+ pub const run = @import("jj.zig").compareWord;
+};
+
/// Count, for each declaration of a file's pane, the changes in `window` (jj) that touched it, and show it in this view: a heat lane after the line number and a strip by the scroll thumb, the line numbers' grey to the theme's red on a log scale; `window` a revset or a span of time (`3d`, `2w`, `6m`, `1y`); bare, shown here or not (none counted yet: the file's whole history).
pub const Churn = struct {
pub const takes_arg = true;