Subject: Re: Switching from CVS to GIT

From: Brian Dessent <[email-masked]>
Date: Sun, 14 Oct 2007 17:36:38 -0700

Johannes Schindelin wrote:

> The problem is that on Windows, you cannot keep a file open and delete it
> at the same time.  This is an issue in Windows' equivalent of VFS.
> 
> A neat trick to work with temporary files without permission issues is to
> open the file and delete it right after that.  This does not work on
> Windows.

You can achieve the same thing on Windows with CreateFile() by setting
the dwShareMode parameter to zero and setting the
FILE_FLAG_DELETE_ON_CLOSE attribute on dwFlagsAndAttributes.  This
results in a file that cannot be opened or read by any other process and
that will be automatically deleted when all open handles are closed.

> I think Alex means this: you can have C:\a\b\c and D:\a\b\c.  So depending
> on which drive you are, you mean one or the other.  Just comparing the
> paths is not enough.

This just means that you have to consider the drive letter as part of
the filename.

> > > - no real "mmap" (which kills perfomance and complicates code)
> >
> > You only need mmap because you are accustomed to use it on GNU/Linux.
> 
> Yes.  And we rely on the performance very much.

Windows may not call it mmap() but it most certainly has memory-mapped
file IO:
<http://msdn2.microsoft.com/en-us/library/aa366781.aspx#file_mapping_functions>.

Brian