From 988b288b870dd0165f09b991839c2c37fcd3fd62 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 30 Sep 2026 21:38:57 -0300 Subject: A diff line looks up the path and line it names, as any look does The look on a diff line was its own resolver: a walk up to .git/.jj from the diff's directory, its own "no such file here" and "deleted by this diff". A review tool's cached patch, in no repository, missed every file though the session's terminals sat in the checkout. Now a diff line only expands and transforms. Its expansion (what the hover shows) is the whole line for a header, a `@@` line, or a hunk line pointed at on its prefix, and its text is the look address the line names (look.diffAddress): `path` for `diff --git`/`---`/`+++`, `path:c` for `@@ -a,b +c,d @@`, `path:N` for a hunk line's new line (a removed line's, the new line now where it was). That text goes through the regular look exactly as if selected by hand: same resolution, placement and errors. A 9P look of a whole diff line takes the same transform. Kept: the line classification, hunk arithmetic, git prefix stripping and timestamp cutting (diff.zig). Gone: the repo-root walk, its messages, Target.old_side and deletesAhead, and the click's row stash (Pardes.diff_look). A test compares a B3 on a cached patch's line with a look of the hand-selected `entry/src/entry.rs:2` in the same session. Co-Authored-By: Claude Opus 5.5 --- src/CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/CHANGELOG.md') diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index ae796a4d..a1caffb4 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Unreleased + +- A look on a diff line is the look of the `path:line` it names, exactly as + if that text were selected by hand: the same resolution, placement and + errors. A patch cached outside any checkout opens the file the way a + hand-selected path would, and the diff's own path finding and its + messages are gone. + ## 0.0.12 - A selection deep in a very long line no longer slows every frame: a 5 MB -- cgit v1.3