jj revsets add diff_lines_added() and diff_lines_removed()
Introduced 2026-04-02 · score 0.95
HOW TO USE IT
When querying revisions for content changed on one side of a diff, use `diff_lines_added(text, [files])` for added lines or `diff_lines_removed(text, [files])` for removed lines.
jj log -r 'diff_lines_added("<pattern>")'jj log -r 'diff_lines_removed("<pattern>")'WHY THIS HELPS
Match added or removed content while querying revisions.
REQUIREMENTS AND LIMITATIONS
- Version: v0.40.0
- text (required): Line-by-line string pattern to match on the selected diff side.
- files: Fileset expression narrowing search paths; all modified files are scanned by default.
FIRST-PARTY EVIDENCE
- https://github.com/jj-vcs/jj/releases/tag/v0.40.0
- https://github.com/jj-vcs/jj/blob/v0.40.0/docs/revsets.md
Check the installed version and the source before using it. Entry JSON