summaryrefslogtreecommitdiff
path: root/git-gui/lib/commit.tcl
diff options
context:
space:
mode:
authorTobias Boesch <tobias.boesch@miele.com>2024-09-12 10:17:57 +0000
committerJohannes Sixt <j6t@kdbg.org>2024-09-14 15:20:16 +0200
commit8ff65c7a53144bf9f90709ff3fe47cf83f82e8eb (patch)
treeeff319feb1516e936a87590822b3175c0b5a5730 /git-gui/lib/commit.tcl
parent2864e855932540c3ec6c9bf41ee3fe027d85f642 (diff)
git gui: add directly calling merge tool from configuration
git gui can open a merge tool when conflicts are detected (Right click in the diff of the file with conflicts). The merge tools that are allowed to use are hard coded into git gui. If one wants to add a new merge tool it has to be added to git gui through a source code change. This is not convenient in comparison to how it works in git (without gui). git itself has configuration options for a merge tools path and command in the git configuration. New merge tools can be set up there without a source code change. Those options are used only by pure git in contrast to git gui. git calls the configured merge tools directly from the configuration while git Gui doesn't. With this change git gui can call merge tools configured in the configuration directly without a change in git gui source code. It needs a configured "merge.tool" and a configured "mergetool.<mergetool name>.cmd" configuration entry as shown in the git-config manual page. Configuration example: [merge] tool = vscode [mergetool "vscode"] cmd = \"the/path/to/Code.exe\" --wait --merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" Without the "mergetool.<mergetool name>.cmd" entry and an unsupported "merge.tool" entry, git gui behaves mainly as before this change and informs the user about an unsupported merge tool. In addtition, it also shows a hint to add a configuration entry to use the tool as an unsupported tool with degraded support. If a wrong "mergetool.<mergetool name>.cmd" is configured by accident, it gets handled by git gui already. In this case git gui informs the user that the merge tool couldn't be opened. This behavior is preserved by this change and should not change. "Beyond Compare 3" and "Visual Studio Code" were tested as manually configured merge tools. Signed-off-by: Tobias Boesch <tobias.boesch@miele.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Diffstat (limited to 'git-gui/lib/commit.tcl')
0 files changed, 0 insertions, 0 deletions