mmap(win32): avoid expensive fstat() call
commitd5425d10ca68a297061f87f4460dd7e0b32b39a6
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 22 Apr 2016 14:31:32 +0000 (22 16:31 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Apr 2016 22:01:16 +0000 (22 15:01 -0700)
treefb764715cbda50406df7e55dc86100a8aca47266
parent7ce7ee2d8228a97f023c7e34488ed83a557d83fb
mmap(win32): avoid expensive fstat() call

On Windows, we have to emulate the fstat() call to fill out information
that takes extra effort to obtain, such as the file permissions/type.

If all we want is the file size, we can use the much cheaper
GetFileSizeEx() function (available since Windows XP).

Suggested by Philip Kelley.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/win32mmap.c