From: Junio C Hamano Date: Sat, 08 Oct 2005 18:44:01 GMT Subject: Re: First cut at git port to Cygwin Message-ID: <7vr7avrgr2.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Johannes Schindelin 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. .