-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: Add a "--tool" flag to resolve #2575
Comments
Makes sense. This would also make sense for the diff editor used by At the moment, a workaround is to run This can be made easier with a shell script, see #2575 (comment) below. |
The way we do alias expansion means that you might not even need a shell script for it; you can define an alias like this:
And then use it with |
You can go even fancier: [aliases]
meld = ['--config-toml', 'ui.merge-editor="meld"',
'--config-toml', 'ui.diff-editor="meld-3"',
'--config-toml', 'ui.diff.tool="meld"',
] Alternatively, here's the script I was thinking of. I called it #!/bin/sh
TOOL="$1"
shift
jj --config-toml "[ui]
diff-editor = \"$TOOL\"
merge-editor = \"$TOOL\"
diff.tool = \"$TOOL\"" "$@"; It might be more readable if it had several |
I'd like to take a stab at this is no one else is working on it. |
Thanks! I've assigned this and #1457 to you. |
Is the I don't know enough yet, but I'm wondering if we want to be able to easily "opt-in" a command to take a I will propose an approach to see if it makes sense, but I want to know what seems like a good direction in general. |
I think the merge tools generally take multiple arguments so just pointing to a binary is not enough. See https://martinvonz.github.io/jj/v0.13.0/config/#setting-up-a-custom-merge-tool for how they're configured. I think we'll want |
This gets rid of the last UserSettings dependency from edit_diff_external(). I'm going to remove it from edit_diff() too, and let callers pass a preconfigured MergeTool struct instead. These changes will make it easier to add --tool=<name> argument jj-vcs#2575.
This gets rid of the last UserSettings dependency from edit_diff_external(). I'm going to remove it from edit_diff() too, and let callers pass a preconfigured MergeTool struct instead. These changes will make it easier to add --tool=<name> argument jj-vcs#2575.
This gets rid of the last UserSettings dependency from edit_diff_external(). I'm going to remove it from edit_diff() too, and let callers pass a preconfigured MergeTool struct instead. These changes will make it easier to add --tool=<name> argument #2575.
I didn't add e2e tests to all commands, but the added tests should cover diff_editor/diff_selector/merge_editor() calls. Closes jj-vcs#2575
I didn't add e2e tests to all commands, but the added tests should cover diff_editor/diff_selector/merge_editor() calls. Closes jj-vcs#2575
Is your feature request related to a problem? Please describe.
According to the docs,
ui.merge-editor
key specifies the tool used for three-way merge tools byjj resolve
jj diff --tool=<tool>
to specify which tool to use to diffIt makes sense to also add this flag for conflict resolution.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: