Skip to content

Commit

Permalink
merge_tools: move "ui.diff-instructions" to CLI and config/misc.toml
Browse files Browse the repository at this point in the history
There are no users of this option in jj-lib. Let's simplify it.
  • Loading branch information
yuja committed Mar 2, 2024
1 parent ac47317 commit 5d62826
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions cli/src/config/misc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
tree-level-conflicts = true

[ui]
diff-instructions = true
paginate = "auto"
pager = { command = ["less", "-FRX"], env = { LESSCHARSET = "utf-8" } }
log-word-wrap = false
Expand Down
2 changes: 1 addition & 1 deletion cli/src/merge_tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl DiffEditor {
Ok(DiffEditor {
tool,
base_ignores,
use_instructions: settings.diff_instructions(),
use_instructions: settings.config().get_bool("ui.diff-instructions")?,
})
}

Expand Down
4 changes: 0 additions & 4 deletions lib/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@ impl UserSettings {
.unwrap_or(false)
}

pub fn diff_instructions(&self) -> bool {
self.config.get_bool("ui.diff-instructions").unwrap_or(true)
}

pub fn config(&self) -> &config::Config {
&self.config
}
Expand Down

0 comments on commit 5d62826

Please sign in to comment.