LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

jj-operation-diff

compare repository state between two Jujutsu operations

TLDR

Diff the current operation against its parent
$ jj operation diff
copy
Diff a specific operation against its parent
$ jj op diff --op [operation-id]
copy
Diff two operations
$ jj op diff --from [from-op] --to [to-op]
copy
Include patches of modified changes
$ jj op diff --op [operation-id] --patch
copy
Show a histogram of path changes
$ jj op diff --op [operation-id] --stat
copy
Flat list without the operation graph
$ jj op diff --op [operation-id] --no-graph
copy

SYNOPSIS

jj operation diff [options]

DESCRIPTION

jj operation diff (alias jj op diff) compares repository state between two operations in Jujutsu's operation log. Every jj command that mutates the repo records an operation, so this is the analog of a commit diff but for the operation history.With --operation, the comparison is that operation versus its parent. With --from and --to, you pick both ends. Diff formatting flags (--patch, --stat, --summary, --git, --no-graph) match jj diff / jj operation show.Use jj operation log to find operation IDs. To inspect a single operation (default `@`), jj operation show is usually shorter.

PARAMETERS

--operation, --op OPERATION

Show repository changes in this operation compared to its parent.
-f, --from OPERATION
Start operation of the comparison.
-t, --to OPERATION
End operation of the comparison.
-p, --patch
Show a patch of modifications to changes.
-s, --summary
For each path, show only whether it was modified, added, or deleted.
--stat
Show a histogram of the changes.
-G, --no-graph
Show a flat list of modified changes instead of a graph.
--git
Show a Git-format diff.
--name-only
Print only changed paths.
--show-changes-in REVSETS
Restrict to changed revisions matching the revset. Defaults to `revsets.op-diff-changes-in`.
--tool TOOL
Generate the diff with an external command, or a builtin such as `:git`.
--help
Display help information.

INSTALL

sudo pacman -S jujutsu
copy
sudo apk add jujutsu
copy
sudo zypper install jujutsu
copy
brew install jujutsu
copy
nix profile install nixpkgs#jujutsu
copy

CAVEATS

Subcommand of jj. Operation IDs are not Git commit IDs; copy them from jj op log. Comparing operations that rewrote many revisions can be large. --patch temporarily rebases an older version onto the new parents so the patch is not mixed with unrelated parent changes.

SEE ALSO

RESOURCES

Copied to clipboard
Kai