RE: [PATCH v7 2/2] mergetool: Add per-tool support for the autoMerge flag
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Dec 28, 2020, 01:18 UTC
- Message-ID
- <5fe93275963c_10e652085f@natae.notmuch>
- In-Reply-To
- <20201228004152.522421-3-seth@eseth.com>
Seth House wrote:
Show 13 quoted lines
> diff --git a/git-mergetool.sh b/git-mergetool.sh
> index f4db0cac8d..e3c7d78d1d 100755
> --- a/git-mergetool.sh
> +++ b/git-mergetool.sh
> @@ -334,7 +334,10 @@ merge_file () {
> checkout_staged_file 2 "$MERGED" "$LOCAL"
> checkout_staged_file 3 "$MERGED" "$REMOTE"
>
> - if test "$(git config --bool mergetool.autoMerge)" != "false"
> + if test "$(
> + git config --get --bool "mergetool.$merge_tool.automerge" ||
> + git config --get --bool "mergetool.automerge" ||
> + echo true)" = trueThis is a per-tool user configuration.
Wasn't your argument that some tools would want to disable this flag? That is; the tool, not the user.
For example, the author of diffconflicts might want to disable this flag for all its users, or at least disable it by default.
How can the winmerge difftool disable this flag?
> then > auto_merge > fi
-- Felipe Contreras