ok/jj
1
0
Fork 0
forked from mirrors/jj

docs: describe how to configure scm-diff-editor

This commit is contained in:
Martin von Zweigbergk 2023-06-20 03:21:02 -07:00 committed by Martin von Zweigbergk
parent 86b6a11e63
commit d858964067
2 changed files with 21 additions and 6 deletions

View file

@ -327,6 +327,24 @@ merge-tools.kdiff3.edit-args = [
"--merge", "--cs", "CreateBakFiles=0", "$left", "$right"]
```
### Setting up `scm-diff-editor`
`scm-diff-editor` is a terminal-based diff editor that is part of
the [git-branchless](https://github.com/arxanas/git-branchless) suite of tools.
It's a good alternative to Meld, especially if you don't have a graphical
environment (e.g. when using SSH). To install it:
```shell
cargo install --git https://github.com/arxanas/git-branchless scm-record
--features scm-diff-editor
```
Then config it as follows:
```toml
ui.diff-editor = ["scm-diff-editor", "--dir-diff", "$left", "$right"]
```
### `JJ-INSTRUCTIONS`
When editing a diff, jj will include a synthetic file called `JJ-INSTRUCTIONS`

View file

@ -331,12 +331,9 @@ try `jj log --at-op=367400773f87` but use the hash from your own `jj op log`.
You have already seen how `jj squash` can combine the changes from two commits
into one. There are several other commands for changing the contents of existing
commits. These commands assume that you have `meld` installed. If you prefer
`vimdiff`, add this to your `~/.jjconfig.toml` file:
```
[ui]
diff-editor = "vimdiff"
```
commits. These commands assume that you have `meld` installed. If you prefer a
terminal-based diff editor, you
can [configure `scm-diff-editor`](config.md#setting-up-scm-diff-editor) instead.
We'll need some more complex content to test these commands, so let's create a
few more commits: