Re: Changed diff3 view from 2.36 → 2.67 for vimdiff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Claudio,

On Fri, 22 Jul 2022 at 10:40, Claudio Ebel <claudio.ebel@xxxxxx> wrote:
>
> 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.

I'm not a vimdiff expert by any means, but having three windows
containing LOCAL seems like a bug to me... For what it's worth, I can't
reproduce -- everything looks good to me.

There was some work on vimdiff in the v2.37.0 cycle -- I'm cc-ing the
author of those patches. (He also wrote about the work at [1].)

There exists at least one vimdiff bugfix [2] in git.git's current
'master' branch that is not yet in any released version. If you are able
to build Git from source, you could try that version to see if it fixes
your problem. As far as I understand, that patch relates to end-user vim
settings, and you did write that you nuked your .vimrc, so maybe that
patch doesn't quite match your problem, although from the original
report [3], it does seem similar.

Since redirecting HOME works, I wonder if you do have some other config
file after all. Do you have a ~/.config/git/config file? Maybe,
similarly, you have more than just one vimrc?

There's also a patch to handle whitespace in paths [4], but it's not yet
in git.git's master branch (it's only in the 'next' branch so far). From
your description, it doesn't quite sound like the failure mode that
patch author described, though. If you're interested in trying it out,
you could either `git am` the patch in [4], or you could try `git merge
ccc7b5148` into, e.g., current master.

[1] https://u92.eu/blog/git-vimdiff/
[2] https://lore.kernel.org/git/20220708181024.45839-1-greenfoo@xxxxxx/
[3] https://lore.kernel.org/git/CACRpdvnuAYY0U1_3uD8zKgtq05+bgwjzXpZKomro6gqYDNrjGg@xxxxxxxxxxxxxx/
[4] https://lore.kernel.org/git/pull.1287.v2.git.1657809063728.gitgitgadget@xxxxxxxxx/

Martin




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux