Re: First cut at git port to Cygwin

From: Davide Libenzi <davidel@xmailserver.org>
Date: 2005-10-06 03:29:31
On Wed, 5 Oct 2005, Christopher Faylor wrote:

> On Wed, Oct 05, 2005 at 09:09:49AM -0700, Davide Libenzi wrote:
>> On 10/5/05, Alex Riesen <raa.lkml@gmail.com> wrote:
>>> Still does not work for me.  I cannot isolate the problem out of git,
>>> but at the moment the only way for me to make commit_index_file to work
>>> is to put unlink(indexfile) before rename(cf->lockfile, indexfile).
>>
>> I don't know how Cygwin implemented rename(), but if they used
>> MoveFile() they broke the POSIX rename() since MoveFile() fails if
>> destination already exists.  They should have used
>> MoveFileEx(MOVEFILE_REPLACE_EXISTING) instead, to guarantee POSIX
>> semantics.  The symptoms you're experiencing make me think this might
>> be the case (even if it is strange, since other Unix software would
>> fail the same way).
>
> Cygwin's rename is much more than just a simple wrapper around MoveFile
> or MoveFileEx.  It tries hard to guarantee POSIX semantics within the
> strictures imposed by Windows.

Ouch, IC:

http://cygwin.com/cgi-bin/cvsweb.cgi/~checkout~/src/winsup/cygwin/syscalls.cc?rev=1.390&content-type=text/plain&cvsroot=src

That's quite some code.



- Davide


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Oct 06 03:30:18 2005

This archive was generated by hypermail 2.1.8 : 2005-10-06 03:30:22 EST