Re: First cut at git port to Cygwin

From: H. Peter Anvin <hpa@zytor.com>
Date: 2005-10-11 05:26:16
Johannes Schindelin wrote:
> 
>>Junio C Hamano wrote:
>>
>>>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.
>>>
>>
>>Then PROT_READ probably makes more sense?
> 
> Not necessarily. Sometimes you need to annotate the data from the index, 
> and this does not need to be written back to the index file.
> 

In the above sentence, emphasis on "at least we do not intend to."  If 
writes are done legitimately then that's fine, but we shouldn't have 
"accidental writes" -- those would be program bugs!

> 
>>>Yes.  It might have been overkill that you supported writing
>>>changes back, though.
>>
>>Not just overkill; if we do MAP_PRIVATE it's actively WRONG.
> 
> See above.
> 

Eh?  If we MAP_PRIVATE, *and* we (intentionally) write to it, we 
*BETTER* not write anything back.

	-hpa
-
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 Tue Oct 11 05:27:32 2005

This archive was generated by hypermail 2.1.8 : 2005-10-11 05:27:35 EST