jj-interdiff
Show changes between revisions
TLDR
Compare changes from a revision to the working copy
Compare changes from a revision to another revision
Compare changes in specific paths only
Show a summary of changes
Show diff statistics
Show a Git-format diff
Show a word-level diff with changes indicated only by color
SYNOPSIS
jj interdiff [OPTIONS] <CHANGE1> <CHANGE2>
where CHANGE1 and CHANGE2 are revsets
PARAMETERS
--color <WHEN>
Colorize output: always, never, or auto (default)
--config <KEY=<VALUE>>...
Set configuration options
--diff-mode <MODE>
Diff algorithm: graph or line
--format <FORMAT>
Output format
--git
Produce git-compatible diff output
--no-pager
Disable pager
--pager <PAGER>
Use specified pager
--path <PATH>...
Limit to these paths (repeatable)
--repository <REPO>
Use non-default repository
--stats
Show only change statistics
--tool <TOOL>
External diff tool
DESCRIPTION
jj interdiff is a command in the Jujutsu (jj) version control system, designed to show the differences between two diffs. Jujutsu is a Git-compatible VCS emphasizing usability and performance.
Given two revisions (specified as revsets), it compares the diff from each revision's parents to the revision itself. The output highlights:
• Lines added in the first diff but absent or changed in the second.
• Lines removed from the first diff in the second.
• Modified lines between the diffs.
This is invaluable for code review iterations, e.g., seeing updates to a patch series without full re-review. Output uses a unified diff format with special annotations like + for added, - for removed, and ~ for modified.
Revsets provide flexibility: @ (working copy), branch, root(), or expressions like foo~ (parent of foo). Supports path filtering, stats, git format, and tools.
Ideal for workflows like amending commits or rebasing, revealing precise evolution of changes.
CAVEATS
Requires Jujutsu installed and repo initialized. Revsets must resolve to changes with parents; ambiguous revsets error. Not suitable for multi-parent merges.
EXAMPLES
jj interdiff foo~ foo
Changes added/removed in latest 'foo'.
jj interdiff @- @
Review working copy changes vs previous commit.
jj interdiff --git --path src/ oldrev newrev
REVSET TIPS
Use jj help revsets for syntax. Common: @- (w.d.g. parent), branch(), draft().
HISTORY
Introduced in Jujutsu v0.18.0 (2023). Jujutsu, developed by Martin von Zweigbergk since 2021 at Google, aims for better Git UX with features like built-in revsets and operation logs.


