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

[PATCH] meson: wire up USE_NSEC build knob

From
D. Ben Knoble <ben.knoble+github@gmail.com>
Date
Jun 20, 2026, 16:00 UTC
Message-ID
<c4c5ade901ff95b0f95939ea818870e4f3d59da1.1781971201.git.ben.knoble+github@gmail.com>

Autotools-style builds permit enabling USE_NSEC for cases where that's desired; the equivalent knob is missing from meson-based builds.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
---
 meson.build       | 4 ++++
 meson_options.txt | 2 ++
 2 files changed, 6 insertions(+)
diff --git a/meson.build b/meson.build
index 3247697f74..85a11119c5 100644
--- a/meson.build
+++ b/meson.build
@@ -838,6 +838,10 @@ if help_format_opt != 'man'
     libgit_c_args += '-DDEFAULT_HELP_FORMAT="' + help_format_opt + '"'
 endif
 
+if get_option('nanosec')
+  libgit_c_args += '-DUSE_NSEC'
+endif
+
 libgit_include_directories = [ '.' ]
 libgit_dependencies = [ ]
 
diff --git a/meson_options.txt b/meson_options.txt
index d936ada098..1bc75278a8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -21,6 +21,8 @@ option('runtime_prefix', type: 'boolean', value: false,
   description: 'Resolve ancillary tooling and support files relative to the location of the runtime binary instead of hard-coding them into the binary.')
 option('sane_tool_path', type: 'array', value: [],
   description: 'An array of paths to pick up tools from in case the normal tools are broken or lacking.')
+option('nanosec', type: 'boolean', value: false,
+  description: 'Care about sub-second file mtimes and ctimes.')
 
 # Build information compiled into Git and other parts like documentation.
 option('build_date', type: 'string', value: '',

base-commit: 0c8ab3ebcc76981376809c8fe632d0fe18e93347
-- 
2.55.0.rc0.738.g0c8ab3ebcc.dirty
Next: Junio C Hamano
Message 1 of 19 in “meson: wire up USE_NSEC build knob”
  1. meson: wire up USE_NSEC build knobD. Ben Knoble, Jun 20, 2026
  2. Junio C HamanoJun 21, 2026
  3. D. Ben KnobleJun 21, 2026
  4. Patrick SteinhardtJun 22, 2026
  5. Jeff KingJun 21, 2026
  6. Patrick SteinhardtJun 22, 2026
  7. Jeff KingJun 28, 2026
  8. Jeff KingJun 28, 2026
  9. brian m. carlsonJun 29, 2026
  10. Patrick SteinhardtJun 29, 2026
  11. Junio C HamanoJun 29, 2026
  12. Jeff KingJun 30, 2026
  13. D. Ben KnobleJul 3, 2026
  14. D. Ben KnobleJul 3, 2026
  15. D. Ben KnobleJul 3, 2026
  16. Patrick SteinhardtJul 6, 2026
  17. Jeff KingJul 7, 2026
  18. Junio C HamanoJul 11, 2026
  19. Ben KnobleJul 13, 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.