jj-operation-diff(1)
π jj-operation-diff(1) β¨
okay so bestie, welcome to jj-operation-diff(1) β that's the manual page name, we're folding it in right here at the top like a little name tag at a party π. This is one of the General Commands Manual pages for Jujutsu (jj), and it's literally all about comparing what happened to your repo between two operations. iykyk.
πΈ NAME πΈ
jj-operation-diff β compare changes to the repository between two operations. that's it, that's the vibe check π
π¦ SYNOPSIS π¦
jj operation diff [--operation] [-R|--repository] [-f|--from]
[--ignore-working-copy] [--no-integrate-operation] [-t|--to]
[-G|--no-graph] [--ignore-immutable] [--at-operation] [-p|--patch]
[--debug] [-s|--summary] [--color] [--stat] [--quiet] [--types]
[--name-only] [--no-pager] [--config] [--git] [--color-words]
[--config-file] [--tool] [--context] [--ignore-all-space]
[--ignore-space-change] [--show-changes-in] [-h|--help]
π DESCRIPTION π
Compare changes to the repository between two operations. yes. that's the whole thing. it's giving "diff, but for the operation log" and honestly? iconic π
β¨ OPTIONS β¨
--operation <OPERATION>β show the repository changes in this operation, compared to its parent π-f,--from <FROM>β show repository changes from this operation π«Ά-t,--to <TO>β show repository changes to this operation π«Ά-G,--no-graphβ show a flat list of modified changes instead of a graph. flat list era, no tree, no drama πΈ-p,--patchβ show a patch of the modifications to changes π©Ή- ok so important detail: if the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes. the way it does that just so your diff stays clean ππ
-h,--helpβ print help (see a summary with-h) π
π DIFF FORMATTING OPTIONS π
-s,--summaryβ for each path, show only whether it was modified, added, or deleted. short and sweet, like a text back π¬--statβ show a histogram of the changes π--typesβ for each path, show only its type before and after π€- The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after.
-indicates that the path was not present,Frepresents a regular file,Lrepresents a symlink,Crepresents a conflict, andGrepresents a Git submodule. two little letters carrying so much info fr fr π
- The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after.
--name-onlyβ for each path, show only its path π·οΈ- Typically useful for shell commands like:
jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g'
--gitβ show a Git-format diff. classic, familiar, lowkey comforting π§--color-wordsβ show a word-level diff with changes indicated only by color π--tool <TOOL>β generate diff by external command π§- A builtin format can also be specified as
:<name>. For example,--tool=:gitis equivalent to--git. yup, shortcut queen π
- A builtin format can also be specified as
--context <CONTEXT>β number of lines of context to show πͺ--ignore-all-spaceβ ignore whitespace when comparing lines π«₯--ignore-space-changeβ ignore changes in amount of whitespace when comparing lines π«₯--show-changes-in <REVSETS>β show only changed revisions matching the given revset expression π―- If no revisions are specified, this defaults to the
revsets.op-diff-changes-insetting. defaults, gotta love 'em π
- If no revisions are specified, this defaults to the
π GLOBAL OPTIONS π
-R,--repository <REPOSITORY>β path to repository to operate on π- By default, Jujutsu searches for the closest
.jj/directory in an ancestor of the current working directory. it goes looking for home π₯Ί
- By default, Jujutsu searches for the closest
--ignore-working-copyβ don't snapshot the working copy, and don't update it π ββοΈ- By default, Jujutsu snapshots the working copy at the beginning of every command. The working copy is also updated at the end of the command, if the command modified the working-copy commit (
@). If you want to avoid snapshotting the working copy and instead see a possibly stale working-copy commit, you can use--ignore-working-copy. This may be useful e.g. in a command prompt, especially if you have another process that commits the working copy. - Loading the repository at a specific operation with
--at-operationimplies--ignore-working-copy. so it's automatic, no need to say it twice π
- By default, Jujutsu snapshots the working copy at the beginning of every command. The working copy is also updated at the end of the command, if the command modified the working-copy commit (
--no-integrate-operationβ run the command as usual but don't integrate any operations π«- When this option is given, the operations will still be created as usual but they will not be integrated to the operation log. The working copy will also not be updated.
- The command will print the resulting operation ID. You can pass that to e.g.
jj --at-opto inspect the resulting repo state, or you can pass it tojj op restoreto restore the repo to that state. You can also pass the ID tojj op integrateto integrate the operation. so many doors, one ID π - Note that this does not prevent side effects outside the repo. For example,
jj git push --no-integrate-operationwill still perform the push. > β οΈ bestie READ THIS ONE: the push still happens. the flag is not a "do nothing" button, ok? π
--ignore-immutableβ allow rewriting immutable commits π- By default, Jujutsu prevents rewriting commits in the configured set of immutable commits. This option disables that check and lets you rewrite any commit but the root commit. root commit stays protected, no exceptions π
- This option only affects the check. It does not affect the
immutable_heads()revset or theimmutabletemplate keyword.
--at-operation <AT_OPERATION>β operation to load the repo at βͺ- Operation to load the repo at. By default, Jujutsu loads the repo at the most recent operation, or at the merge of the divergent operations if any.
- You can use
--at-op=<operation ID>to see what the repo looked like at an earlier operation. For examplejj --at-op=<operation ID> stwill show you whatjj stwould have shown you when the given operation had just finished.--at-op=@is pretty much the same as the default except that divergent operations will never be merged. time travel but make it version control π°οΈ - Use
jj op logto find the operation ID you want. Any unambiguous prefix of the operation ID is enough. - When loading the repo at an earlier operation, the working copy will be ignored, as if
--ignore-working-copyhad been specified. - It is possible to run mutating commands when loading the repo at an earlier operation. Doing that is equivalent to having run concurrent commands starting at the earlier operation. There's rarely a reason to do that, but it is possible. rare but possible, the chaotic option π
--debugβ enable debug logging π--color <WHEN>β when to colorize output π¨- Possible values:
alwaysneverdebugauto
- Possible values:
--quietβ silence non-primary command output π€«- For example,
jj file listwill still list files, but it won't tell you if the working copy was snapshotted or if descendants were rebased. the main character output stays, the side commentary dips βοΈ - Warnings and errors will still be printed. don't worry, you'll still hear about the bad stuff π¨
- For example,
--no-pagerβ disable the pager π--config <NAME=VALUE>β additional configuration options (can be repeated) π- The name should be specified as TOML dotted keys. The value should be specified as a TOML expression. If string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted.
--config-file <PATH>β additional configuration files (can be repeated) π
and that's the whole page bestie!! every option, every default, every warning β all present and accounted for π«Άβ¨
ok so about the little sign-off at the bottom of the original page π₯Ί β the footer there just reads diff on the left and jj-operation-diff(1) on the right, no version string and no date anywhere in sight. so consider this the cute version of that: page name jj-operation-diff(1), footer word diff, and no date/version to report β we keep it 100% honest around here π―π mwah, go diff some operations, you got this ππ¦
π¦ where this page comes from
- arch rolling: jujutsu 0.46.0-1 Β· Apache-2.0
- nixpkgs unstable: jujutsu 0.46.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms