Thread (40 messages) flat view 40 messages, 4 authors, 6d ago

Re: [PATCH v3 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec

From: Patrick Steinhardt <hidden>
Date: 2026-08-20 05:26:12

On Wed, Aug 19, 2026 at 09:15:44AM -0700, Junio C Hamano wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
quoted
diff --git a/environment.c b/environment.c
index 6676e6f5ae..c7f6b801f4 100644
--- a/environment.c
+++ b/environment.c
@@ -571,6 +571,13 @@ int git_default_core_config(const char *var, const char *value,
 		return 0;
 	}
 
+#ifndef NO_NSEC
+	if (!strcmp(var, "core.usenanosec")) {
+		cfg->use_nanosec = git_config_bool(var, value);
+		return 0;
+	}
+#endif
Do we want to omit a warning in case the config is enabled and we have
NO_SEC set? Or would that be too obnoxious?
Those who use a $HOME/.gitconfig shared across two machines with
different builds would be annoyed with one of them constantly
complaining, I am afraid.
Yeah, that's what I was hinting at with "too obnovious". So I agree,
let's not add one.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help