git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/3] treewide: migrate from legacy utime.h to utimensat

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 22, 2026, 16:03 UTC
Message-ID
<aonIVn-ZQoMKWCAd@fruit.crustytoothpaste.net>
In-Reply-To
<pull.2209.git.1787322203.gitgitgadget@gmail.com>
On 2026-08-21 at 14:23:20, Alexey Samsonov via GitGitGadget wrote:
Show 13 quoted lines
> utime() function for setting access/modification time for files (and a
> corresponding <utime.h> 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 <fcntl.h>,
> and, as a possible fallback for older systems compatibility, utimes()
> function from <sys/stat.h>. It also provides the corresponding MinGW
> wrapper.

I seem to remember that we cannot use the *at functions because of Windows and the fact that it doesn't offer the proper semantics. I'm curious as to how you did this, but I didn't read the series because of the below.

Show 11 quoted lines
> 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.
> 
> No behavior changes is intended or expected (except for Git explicitly
> passing nanosecond-precision timestamps to kernel, where previously only
> second-level precision was used).
> 
> This change is generated by Gemini Flash from Antigravity, but all the code
> has been manually verified by me, and, where applicable, adjusted to match
> the existing behavior as closely as possible.
Unfortunately, I don't think that's allowed.  From SubmittingPatches[0]:
    The Developer's Certificate of Origin requires contributors to certify
    that they know the origin of their contributions to the project and
    that they have the right to submit it under the project's license.
    It's not yet clear that this can be legally satisfied when submitting
    significant amount of content that has been generated by AI tools.

I therefore haven't read this series to avoid being influenced by code we're not allowed to include.

[0] https://git-scm.com/docs/SubmittingPatches#ai
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 19 in “treewide: migrate from legacy utime.h to utimensat”
  1. 0/3 treewide: migrate from legacy utime.h to utimensatAlexey Samsonov via GitGitGadget, Aug 21, 2026
  2. 1/3 compat/posix: introduce utimensat(2) wrapperAlexey Samsonov via GitGitGadget, Aug 21, 2026
  3. 2/3 treewide: use utimensat(2) instead of legacy utime(3p)Alexey Samsonov via GitGitGadget, Aug 21, 2026
  4. 3/3 compat/posix: drop legacy <utime.h> header and shimsAlexey Samsonov via GitGitGadget, Aug 21, 2026
  5. Junio C HamanoAug 21, 2026
  6. brian m. carlsonAug 22, 2026
  7. Junio C HamanoAug 22, 2026
  8. brian m. carlsonAug 22, 2026
  9. Junio C HamanoAug 23, 2026
  10. Weijie YuanAug 23, 2026
  11. Junio C HamanoAug 23, 2026
  12. Weijie YuanAug 23, 2026
  13. Junio C HamanoAug 24, 2026
  14. Weijie YuanAug 24, 2026
  15. Weijie YuanAug 24, 2026
  16. Junio C HamanoAug 24, 2026
  17. Junio C HamanoAug 24, 2026
  18. Weijie YuanAug 24, 2026
  19. Oswald BuddenhagenAug 24, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.