Hi,

I'm using git for windows, PortableGit-1.7.11-preview20120710 (I've
just upgraded from PortableGit-1.7.6-preview20110709, which also had
the problem), on windows 7 (SP1). I find it handy when running "git
difftool" to make changes to the file in the difftool (I personally
use diffmerge http://www.sourcegear.com/diffmerge/ ) - especially if
files are very long, and you can remove spurious new lines, etc. etc.
with ease minimizing the number of changes you are going to make in
your commit. This is usually no problem.

The problem is that, I have found that sometimes files seem to be
locked, and whilst the diff program is open, I cannot write to the
file - neither from the difftool nor from, say, another text editor.
When I close diffmerge, the file is writable again. Logging off and on
again and the problem persists.

Diffmerge says:
"Could not open this file for writing. Try to override file
permissions?" [I click 'Yes'] "Error! Cannot open file."

Notepad++ says:
"Save failed    Please check whether if this file is opened in another program"

Other programs give similar errors.

I've tried running the command both as an administrator and as a
normal user, and there seems to be nothing wrong with
permissions/ownership on the file. Using the "Process Explorer"
Sysinternals tool, I can see that git.exe has a file handle open - and
I guess the mode it has opened the file is preventing writes - thing
is - it doesn't always seem to do this. Makes me wonder if the file
handle isn't being closed properly in these circumstances? If this is
by-design, it is not happening consistently, because 99% of the time I
can edit no problem.

Thanks,
Ben Blamey
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to