]> git.ipfire.org Git - thirdparty/git.git/commit
t/helper/test-chmtime: update mingw to support chmtime on directories
authorTao Klerks <tao@klerks.biz>
Wed, 2 Mar 2022 06:05:23 +0000 (06:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Mar 2022 06:55:07 +0000 (22:55 -0800)
commit090a3085bc9f2101b69b3c8940278fb7c22f02c9
tree8be0da8bd6ca82780c067c84b0475540b604b22a
parent715d08a9e51251ad8290b181b6ac3b9e1f9719d7
t/helper/test-chmtime: update mingw to support chmtime on directories

The mingw_utime implementation in mingw.c does not support
directories. This means that "test-tool chmtime" fails on Windows when
targeting directories. This has previously been noted and sidestepped
temporarily by Jeff Hostetler, in "t/helper/test-chmtime: skip
directories on Windows" in the "Builtin FSMonitor Part 2" work, but
not yet fixed.

It would make sense to backdate file and folder changes in untracked
cache tests, to avoid needing to insert explicit delays/pauses in the
tests.

Add support for directory date manipulation in mingw_utime by
replacing the file-oriented _wopen() call with the
directory-supporting CreateFileW() windows API explicitly.

Signed-off-by: Tao Klerks <tao@klerks.biz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c