Re: First cut at git port to Cygwin
- From
Junio C Hamano <junkio@cox.net>
- Date
- Oct 8, 2005, 18:44 UTC
- Message-ID
- <7vr7avrgr2.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0510082023130.25971@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Am I missing something? I don't see where the changes are written back to > the fd. After all, mmap() is called with PROT_WRITE...
PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall correctly we do not write file via mmap -- at least we do not intend to.
- index file is mapped for reading, long ago it was mapped read-only but these days we do PROT_WRITE, but updates are done via opening a new file and writing afresh.
- objects are mapped for reading, but, never updated once created. Creation side is regular open - write - close.
- diff reads original by mapping, but obviously has no business writing.
- local-fetch reads original by mapping for copying.
> *shameless plug* Of course, this problem does not come up with > my NO_MMAP patch.
Yes. It might have been overkill that you supported writing changes back, though. .