You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'ui.diff-viewer' combines 'ui.diff.tool' and 'ui.diff.format' into a single
setting, which in turn allows repository level configuration to override
global settings (see jj-vcs#3327).
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Deprecations
11
11
12
+
*`ui.diff.format` and `ui.diff.tool` were deprecated in favor of `ui.diff-formatter`
13
+
12
14
*`jj move` was deprecated in favor of `jj squash`.
13
15
14
16
### Breaking changes
@@ -18,6 +20,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
20
19
21
### New features
20
22
23
+
* Add `ui.diff-formatter` combining the both `ui.diff.format` and `ui.diff.tool` into a single setting. Built-in formats previously set via `ui.diff.format` can now be specified prefixed with `:`. Having a single option allows a repository level built-in format to override a global tool format.
Config error: Unknown format setting for 'ui.diff-viewer', built-in formats are ':summary', ':types', ':git', ':color-words', and ':stat', or use an external tool
787
+
For help, see https://github.com/martinvonz/jj/blob/main/docs/config.md.
788
+
"###);
789
+
790
+
let edit_script = test_env.set_up_fake_diff_editor();
Copy file name to clipboardExpand all lines: docs/config.md
+8-9
Original file line number
Diff line number
Diff line change
@@ -165,24 +165,23 @@ useful reminder to fill in things like BUG=, TESTED= etc.
165
165
ui.default-description = "\n\nTESTED=TODO"
166
166
```
167
167
168
-
### Diff format
168
+
### Generating diffs with built-in and external formatters
169
+
170
+
Different diff formatters can be chosen with the `ui.diff-viewer` setting. `jj` provides three built-in formatters, `:color-words` (the default), `:git`, and `:summary`.
169
171
170
172
```toml
171
-
# Possible values: "color-words" (default), "git", "summary"
172
-
ui.diff.format = "git"
173
+
[ui]
174
+
diff-viewer = ":git"
173
175
```
174
176
175
-
### Generating diffs by external command
176
-
177
-
If `ui.diff.tool` is set, the specified diff command will be called instead of
178
-
the internal diff function.
177
+
An external diff command can be used instead of a built-in formatter, specifying the command and its arguments.
0 commit comments