Re: First cut at git port to Cygwin
- From
- Davide Libenzi <davidel@xmailserver.org>
- Date
- Oct 5, 2005, 16:09 UTC
- Message-ID
- <Pine.LNX.4.63.0510050902430.28854@localhost.localdomain>
- In-Reply-To
- <20051005155457.GA30303@trixie.casa.cgf.cx>
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).
- Davide