views:

108

answers:

1

I've been using git along with fugitive.vim to manage code when I'm on windows. However, I've run into a problem. According to the documentation, the :GDiff command should a diff window and allow me to stage only parts of a file. However, when I issue the command in a file with changes, I get the following error message: alt text

Is this a problem with windows? vim? fugitive? msysgit? file permissions? Anybody know?

A: 

That may be related to the issue 428 of msysgit mentioned in my SO answer.

Try patching the cmd/git.cmd as I describe in my previous answer and see if this help.

Baring that, 2 options remains:

  • either a locking problem (the file is locked by a process): an utility like process monitor or process explorer might help to see if it is the case (and what handle exactly there is on that swap file)
  • or a Git issue. One good trick is then to install the net-installer of msysgit, which will build the latest version of Git on your Windows. You can then try and see if the problem persists with that updated version.
    Note: third option, trying to downgrade Git, again to rule out any link with that tool.
VonC
I already patched git.cmd, which did fix the earlier issue (thanks for that, by the way.
Paul Wicks
@Paul: I didn't realize that you were the one asking that previous question! ;)
VonC
@Paul: I have updated my answer with some more tests to do.
VonC
@VonC: I checked the swap files and it looks like vim is the only app with a handle for those files. I'm working on checking different versions of msysgit right now and I've also filed an issue on github.
Paul Wicks