From: Junio C Hamano Date: Fri, 21 Aug 2026 17:33:35 GMT Subject: Re: [PATCH 0/3] treewide: migrate from legacy utime.h to utimensat Message-ID: In-Reply-To: "Alexey Samsonov via GitGitGadget" writes: > utime() function for setting access/modification time for files (and a > corresponding header) have been officially removed from POSIX > starting from POSIX.1-2024. While existing system library implementations > still provide this function for compatibility reasons, its implementation > may be removed in the future, or otherwise degrade over time. Some newer > libc implementations (e.g. LLVM-libc, currently under development) don't > provide utime() function at all. > > This PR switches the git codebase to recommended alternative: utimensat() > POSIX function (which supports nanosecond-level precision) from , > and, as a possible fallback for older systems compatibility, utimes() > function from . It also provides the corresponding MinGW > wrapper. > > The alternative is to unconditionally use utimes() where possible, but given > that utimensat is available in glibc starting from 2007, and on BSD systems > since 2012 or so, it makes sense to use the newer variant by default. I hear that Apple has supported it since macOS 10.13 High Sierra, which came out in 2017 and reached EOL in 2020, so we should be safe there as well.