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

Changed diff3 view from 2.36 → 2.67 for vimdiff

From
CEClaudio Ebel <claudio.ebel@web.de>
Date
Jul 22, 2022, 07:48 UTC
Message-ID
<99c80fc2-0f94-a607-ca71-c45961c07e2b@web.de>
Hi all,
when solving a merge conflict using Git and Vim as mergetool, I get a totally different view than I expected and am used to. In the past, I followed this blog post (https://www.rosipov.com/blog/use-vimdiff-as-git-mergetool/), where the result is a view with four windows: LOCAL | BASE | REMOTE and then the file below. Now I get four windows as well, but LOCAL at the top and then LOCAL | LOCAL | file.
First I was not able to figure out if the problem lies within Git or Vim. I removed my global .gitconfig as well as the .vimrc but neither helped. What finally helped was to disguise the HOME directory for Git via this command:

$ git merge octodog $ HOME= git mergetool

My git version:

$ git --version git version 2.37.1

Then I tried older Git versions, 2.37.0 showed the same behavior but Git 2.36.1 showed the old view.
Minimal working example (for bash):

$ cd $(mktemp -d) $ git init $ # ––– config mergetool $ git config merge.tool vimdiff $ git config merge.conflictstyle diff3 $ git config mergetool.prompt false $ # ––– create merge conflict $ echo -e 'cat\ndog\noctopus\noctocat' > animals.txt $ git add animals.txt $ git commit -am 'Initial commit' $ git checkout -b octodog $ sed -i 's/octopus/octodog/' animals.txt $ git commit -am "Replace octopus with an octodog" $ git checkout master $ sed -i 's/octopus/octoman/' animals.txt $ git commit -am "Replace octopus with an octoman" $ # ––– trigger behavior $ git merge octodog $ git mergetool

How can I get the old view back? Is this a bug or a feature of Git? Should I write the Vim guys?
This behavior is independent of directory as well as host, it occurs on a different machine as well.

Thanks in advance, Claudio

Next: Martin Ågren
Message 1 of 5 in “Changed diff3 view from 2.36 → 2.67 for vimdiff”
  1. Claudio EbelJul 22, 2022
  2. Martin ÅgrenJul 22, 2022
  3. Fernando RamosJul 22, 2022
  4. Claudio EbelJul 24, 2022
  5. Fernando RamosJul 25, 2022

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.