mingw: factor out code to set stat() data
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 23 Oct 2018 10:23:19 +0000 (03:23 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Oct 2018 04:18:14 +0000 (13:18 +0900)
commit7bf198388645995d72073d331fd2bc00243ffea1
treefd88687a852c8572e2b644d417215ae3f92282ea
parentc4df23f7927d8d00e666a3c8d1b3375f1dc8a3c1
mingw: factor out code to set stat() data

In our fstat() emulation, we convert the file metadata from Win32 data
structures to an emulated POSIX structure.

To structure the code better, let's factor that part out into its own
function.

Note: it would be tempting to try to unify this code with the part of
do_lstat() that does the same thing, but they operate on different data
structures: BY_HANDLE_FILE_INFORMATION vs WIN32_FILE_ATTRIBUTE_DATA. So
unfortunately, they cannot be unified.

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