Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

difftool randomly locks file in some weird way #1287

Closed
gkv311 opened this issue Sep 1, 2017 · 2 comments
Closed

difftool randomly locks file in some weird way #1287

gkv311 opened this issue Sep 1, 2017 · 2 comments
Labels

Comments

@gkv311
Copy link

gkv311 commented Sep 1, 2017

I was not able to find an open issue matching what I'm seeing.

Setup

Git-2.14.1-64-bit.exe

$ git --version --build-options
git version 2.14.1.windows.1
built from commit: 82d9b3f3b2407b52251620597d4b14933685459d
sizeof-long: 4
machine: x86_64

Windows 10 Pro 64-bit [1703]

$ cmd.exe /c ver
Microsoft Windows [Version 10.0.15063]

I have tried different install options (e.g. disabling/enabling file caching), which seems to be not affecting an issue.

> type "C:\Program Files\Git\etc\install-options.txt"
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Disabled
Use Credential Manager: Disabled
Enable Symlinks: Disabled

Details

After upgrading to 2.14 I'm suffering from random issues while using git difftool configured for using DiffMerge (I suppose it is irrelevant to specific Diff tool, but I have no other tools at hand to check):

[difftool "DiffMerge"]
	cmd = \"c:/work/Programs/DiffMerge/sgdm.exe\" $LOCAL $REMOTE

The usage scenario:

  • modify source files using Visual Studio or other editor
  • start git difftool for modified file
  • modify file within DiffMerge
  • try saving results within DiffMerge
    Result: Could not open this file for writing.

For the moment, I'm unable to figure out in which particular conditions this happens, but it happens not for every modified file. The issue remains reproducible for specific file even after closing other applications and re-installing git. Rolling back to Git-2.9.0 solves the issue for the file, and re-installing Git-2.14.1 reveals issue back.

Currently, I've got this issue while using private git repository, so I cannot share reproducible test case. I don't see anything unusual within file permissions of modified file.

@dscho
Copy link
Member

dscho commented Sep 1, 2017

It sounds as if another process still locks those files. Maybe an antivirus? Or maybe Visual Studio? But then, when I edit files in Visual Studio, I can easily modify them outside and Visual Studio will ask me whether I want to reload said files. Maybe this unspecified "other editor" is less nice?

@dscho dscho added the unclear label Sep 1, 2017
@dscho
Copy link
Member

dscho commented Oct 5, 2017

I'm suffering from random issues while using git difftool configured for using DiffMerge

Which version of DiffMerge? Where can I download the exact same version of Diffmerge as you used? Can you reproduce the same issue maybe with a diff tool that is available in Git for Windows already without requiring me to install yet another software?

Rolling back to Git-2.9.0 solves the issue for the file, and re-installing Git-2.14.1 reveals issue back.

Please note that there are tons of versions in between. It would have helped me a lot if you would have pinpointed this down quite a bit more (and it would have helped you, too, as you can see by the time frame of my responses: you would have been helped a lot earlier).

Currently, I've got this issue while using private git repository, so I cannot share reproducible test case.

In general, it is a good idea to try non-private git repositories. You never know whether this is an issue with your private repository (in which case the duty lies with you to investigate further), or with Git for Windows in general (in which case you never need to say that this happens on your private repository, but can provide a detailed step-by-step instruction allowing developers with intimate knowledge of Git to dig in much quicker, meaning: giving developers an incentive to start digging in).

As it happens, somebody opened a duplicate at #1315 that pinpointed the change to v2.12.1->v2.12.2 (which of itself did not help me identify the issue, sadly) and used WinMerge, for which I happened to have an installer lying around. So I'll just close this ticket in favor of #1315.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants