Diff keyboard navigation shortcuts
(1) By Florian Balmer (florian.balmer) on 2022-09-28 14:24:13 [source]
- Hide all diffs.
- Show all diffs.
- Show only previous diff, hide all others.
- Show only next diff, hide all others.
(In this context, "diff" means "per-file diff chunk"; maybe the wording needs to be improved. "File-diff block", or just "file-diff"?)
The idea is that it's possible to repeatedly press P for a diff-by-diff review, to help with reviews of large change sets.
With O and P, the current diff is scrolled into view, with some headroom for the preceding 3 to 4 file names.
- Restore shown/hidden state on back/forward navigation (or simply reset shown/hidden state to show all).
(2) By Alfred M. Szmidt (ams) on 2022-09-29 06:14:37 in reply to 1 [link] [source]
Instead of "diff" -- why not say changes? Per file changes.
(3) By Florian Balmer (florian.balmer) on 2022-09-29 10:52:43 in reply to 2 [link] [source]
Thanks for the input!
"Change" right now sounds like a synonym to "diff" to me, but I'll certainly consider it. This is also the wording used in your initial feature proposal, and (at least) stephan understod it.
Other notations in forum posts and check-in comments are "show/hide individual diffs", or "diff toggles".
From my reading of `patch' command output and error messages, and browsing stackoverflow.com page(s), a patch file has block headers and hunks (or chunks), but I'm not sure if file-scoped blocks are named explicitly.
(4) By Alfred M. Szmidt (ams) on 2022-09-29 12:47:10 in reply to 3 [link] [source]
I(MHO, take it with salt) think there is a small difference between "change" (or more specifically, "file change") and "diff", the later refers to a program that produces "differences", a "diff" file can contain multiple changes to multiple files.
"Change" is a bit more fluffy, so it can be better redefined to mean something specific in the scope of Fossil, and it works well in plural -- "file change", "file changes" -- and even "file change hunks" to refer to specific hunks. Where, "diffs" I'd assume multiple diff files, that contain file changes, and those inturn contain hunks.
Good reference: https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html
(5) By Florian Balmer (florian.balmer) on 2022-09-30 06:21:01 in reply to 4 [link] [source]
That makes perfect sense.
Thanks for the link, it's impressive how little documentation is necessary for this clever format.