summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 21:38:57 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit988b288b870dd0165f09b991839c2c37fcd3fd62 (patch)
tree6552dc29f322c6ec6ee89b3ffdcc811389305e27 /docs
parent68dd567218505838814d73473460a0c0ff8e97b3 (diff)
downloadpardes-988b288b870dd0165f09b991839c2c37fcd3fd62.tar.gz
pardes-988b288b870dd0165f09b991839c2c37fcd3fd62.zip
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 <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/fs.md5
-rw-r--r--docs/tags.md42
2 files changed, 23 insertions, 24 deletions
diff --git a/docs/fs.md b/docs/fs.md
index 7fa33a02..6b73a124 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -222,8 +222,9 @@ go. An `exec` line's blanks at either end are trimmed.
too.
- a directory types `ls` into a terminal idle there, else opens one there.
- a URL opens in the browser.
-- in a diff pane, a whole line of the diff opens the place it names, as a
- right click on its first column does ([tags.md](tags.md#reviewing-diffs)).
+- in a diff pane, a whole line of the diff is a look at the `path:line` it
+ names, as a right click on its first column is
+ ([tags.md](tags.md#reviewing-diffs)).
- a plain word selects its next place after dot, wrapping (`LookWord list`
on the root ctl lists every place in a `+Search` pane instead). In a
terminal a word is always listed, rows spelled `@p3:12:5-9`.
diff --git a/docs/tags.md b/docs/tags.md
index 9368a60d..eb16cb2a 100644
--- a/docs/tags.md
+++ b/docs/tags.md
@@ -89,29 +89,27 @@ their `+`/`-` in the tint's hue (the theme's ANSI green and red where it
has them); a file in no language pardes knows keeps the plain line colours.
Only the hunks in view are parsed, a few dozen lines at a time, each once.
-Then right-click to jump; the look's hover shows what the click takes. On
-a `diff --git`, `---` or `+++` line, anywhere on it, markers included, that
-is the whole line, and it opens its file: `diff --git a/x b/y` and `+++`
-the new one, `---` the old one unless the `+++` under it names another (a
-rename, a new file, `diff -u old/x new/x`), since the old name is the one
-likely gone. On a `@@ -a,b +c,d @@` line it is the whole line again, and
-opens the new file at line c. On a hunk line, the `+`, `-` or space in its
-first column takes the whole line and opens the new file at that line; for
-a removed line, at the new line now standing where it was (the one after
-it, or the hunk's last when it went from the end of the file). The code
-after it is words, looked at as ever.
+Then right-click to jump: a diff line looks up the path and line it
+names, as any look does. The hover shows the whole line; the look is of
+the address it names, exactly as if that text had been selected by hand
+and right-clicked, with the same resolution (the pane's directory, then
+the places the jumplist has been), placement and errors. On a `diff
+--git`, `---` or `+++` line, anywhere on it, markers included, that is the
+file: `diff --git a/x b/y` and `+++` name the new one, `---` the old one
+unless the `+++` under it names another (a rename, a new file, `diff -u
+old/x new/x`), the old name being the one likely gone. A `@@ -a,b +c,d
+@@` line names `path:c`. On a hunk line, the `+`, `-` or space in its
+first column names `path:` its new line; for a removed line, the new line
+now standing where it was (the one after it, or the hunk's last when it
+went from the end of the file). The code after it is words, looked at as
+ever. A 9P `look` of a whole line of the diff is the same look.
-A path is the repository's name for the file. In a git section (one with a
-`diff --git` line) git's side prefix is dropped when both paths on that
-line carry one, different ones: `a/`/`b/`, or with `diff.mnemonicPrefix`
-`c/`, `i/`, `w/`, `o/`. `--no-prefix` writes none, so there `a/x a/x` is a
-real directory `a`, kept. A plain `diff -u`'s names are used as written,
-past the timestamp. The file is looked for from the repository's root
-(pardes walks up from the diff's directory, a command pane's own, to a
-`.git` or `.jj`), else from that directory. A file that is not here (a
-branch not checked out) opens nothing and says so by that name: `Look:
-src/x.zig: no such file here`, or `deleted by this diff` for a deleted one.
-A 9P `look` of a whole line of the diff does the same.
+The path is the repository's name for the file. In a git section (one
+with a `diff --git` line) git's side prefix is dropped when both paths on
+that line carry one, different ones: `a/`/`b/`, or with
+`diff.mnemonicPrefix` `c/`, `i/`, `w/`, `o/`. `--no-prefix` writes none,
+so there `a/x a/x` is a real directory `a`, kept. A plain `diff -u`'s names
+are used as written, past the timestamp.
## Editing tags