0

Using the below configuration,

[diff]
tool = vimdiff

[difftool]

[difftool "vimdiff"]
cmd = "$EDITOR -d \"$LOCAL\" \"$REMOTE\"; sleep 1"

and using "git diff" during a merge conflict (I specifically don't use "git merge" here), not the specified difftool (vimdiff), but the built-in diff is used (which gives me a patch-like display). When using "git diff" (the very same command) when not in a merge conflict, "vimdiff" is used as expected.

Is this behavior built-in, and can it be overridden?

nickles
  • 1
  • 2
  • _'I specifically don't use "git merge" here'_ - what do you mean? – evolutionxbox Sep 29 '22 at 08:11
  • It is built in, yes: `git diff` during a merge conflict produces a combined diff, and diff tools aren't expected to know how to produce a combined diff so they are not used. – torek Sep 29 '22 at 15:13

1 Answers1

1

i think you can try this to change the editor.

$ git config --global diff.tool vscode
$ git config --global difftool.vscode.cmd 'code --wait --diff $LOCAL $REMOTE'