libgit2/libgit2 — pull request #2339 by kitbellew (2014-05-09 03:48:46+00:00)
Title: [#2338] Don't use win32 mmap while still writing.

MSDN's page on CreateFileMapping cautions that file mappings are not
guaranteed to be coherent when used with regular WriteFile calls,
especially with remote filesystems.

In particular, attempting to work with a clone located on a network
share causes errors while cloning or fetching.

Resolve the problem by using the mmap emulation code already present
in the case of writes interspersed with reads; this code didn't really
benefit much from mmap since the entire stream was read (and verified
by decompressing).