git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] git gui: add directly calling merge tool from gitconfig

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 28, 2024, 17:08 UTC
Message-ID
<xmqq7cc01sow.fsf@gitster.g>
In-Reply-To
<pull.1773.v2.git.1724833917245.gitgitgadget@gmail.com>
"ToBoMi via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: deboeto <tobias.boesch@miele.com>

Use the same ident (human readable name plus e-mail address) you have on your Signed-off-by: line below for this "From: " in-body header.

Show 15 quoted lines
> 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 config.
> New merge tools can be set up there without a
> source code change.

Even if you configure an unknown tool, it would not get any benefit from what git-{diff,merge}tool--lib.sh gives the known diff/merge backends, would it? Instead of a more thorough support for known tools done in setup_tool(), an unknown tool would be handled by setup_user_tool() in git-mergetool-lib.sh which gives somewhat degraded support.

So "can be set up without" may be true, but giving an impression that a tool that is set up like so would work just like a known tool is misleading.

By the way, we do ask contributors to avoid overly long lines, 50-col limt is a bit overly short and makes the resulting text harder to read than necessary.

Show 10 quoted lines
> Those options are used only by pure git in
> contrast to git gui. git calls the configured
> merge tools directly from the config while git
> Gui doesn't.
>
> With this change git gui can call merge tools
> configured in the gitconfig directly without a
> change in git gui source code.
> It needs a configured merge.tool and a configured
> mergetool.cmd config entry.
OK.
Show 16 quoted lines
> gitconfig example:
> [merge]
> 	tool = vscode
> [mergetool "vscode"]
> 	path = the/path/to/Code.exe
> 	cmd = \"Code.exe\" --wait --merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
>
> Without the mergetool.cmd configuration and an
> unsupported merge.tool entry, git gui behaves
> mainly as before this change and informs the user
> about an unsupported merge tool, but now also
> shows a hint to add a config entry for the tool
> in gitconfig.
>
> If a wrong mergetool.cmd is configured by accident
> it is beeing handled by git gui already. In this

"is beeing" -> "is being", but "it gets handled by Git GUI already" should be sufficient.

Show 6 quoted lines
> 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.
Quote proper nouns for readability?  E.g. 
    "Beyond Compare 3" and "Visual Studio Code" were ...
Thanks.
Previous: ToBoMi via GitGitGadgetNext: tobias.boesch@miele.com
Message 6 of 19 in “git gui: add directly calling merge tool from gitconfig”
  1. git gui: add directly calling merge tool from gitconfigToBoMi via GitGitGadget, Aug 19, 2024
  2. Johannes SixtAug 24, 2024
  3. AW: [PATCH] git gui: add directly calling merge tool from gitconfigtobias.boesch@miele.com, Aug 27, 2024
  4. AW: [PATCH] git gui: add directly calling merge tool from gitconfigtobias.boesch@miele.com, Aug 27, 2024
  5. git gui: add directly calling merge tool from gitconfigToBoMi via GitGitGadget, Aug 28, 2024
  6. Junio C HamanoAug 28, 2024
  7. AW: [PATCH v2] git gui: add directly calling merge tool from gitconfigtobias.boesch@miele.com, Sep 5, 2024
  8. Johannes SixtAug 31, 2024
  9. AW: [PATCH v2] git gui: add directly calling merge tool from gitconfigtobias.boesch@miele.com, Sep 6, 2024
  10. Johannes SixtSep 6, 2024
  11. git gui: add directly calling merge tool from gitconfigToBoMi via GitGitGadget, Sep 6, 2024
  12. Johannes SixtSep 8, 2024
  13. AW: [PATCH v3] git gui: add directly calling merge tool from gitconfigtobias.boesch@miele.com, Sep 11, 2024
  14. git gui: add directly calling merge tool from configurationToBoMi via GitGitGadget, Sep 11, 2024
  15. git gui: add directly calling merge tool from configurationToBoMi via GitGitGadget, Sep 12, 2024
  16. Johannes SixtSep 14, 2024
  17. AW: [PATCH v5] git gui: add directly calling merge tool from configurationtobias.boesch@miele.com, Sep 16, 2024
  18. AW: [PATCH v5] git gui: add directly calling merge tool from configurationtobias.boesch@miele.com, Nov 7, 2024
  19. Johannes SixtNov 7, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.