From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CD1D2F3C3E for ; Sun, 30 Aug 2026 21:15:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788124521; cv=none; b=csdmgSmsSxeM5DOElwk6eTteHHULyWsFuUJC0wgA9Fb4omitwg3wwmgrhtdKf1T8CWzEIoCK9S0srKdQ+0PwBs4yq/t2oM0z7F9n17F9Wbg/DCDgoazKfsC1CnN7+ZnxhVJqyryQvd9eJu43X2craxZQqpNp16XyHeeyrumGMUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788124521; c=relaxed/simple; bh=o12iRjzaCCSjld09Ryhh2JA5l5OQbe8fekG3un3wSrw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=JmbESnsh/k96oRI/C86upY5DcHxICvAhD6RkfskROr/jWTYhmR5Pqgoa4MzdQVy8oZ2XQ8q9D8x/0u3O1Xx1hwmd4Mu9FUSsZkBSdD3joW9QPUEFG/cRsR6kjKwbiR9b7aeiIwzPEALOb6/C1LjIOU1PKxq/LCjlvi/4KR5lclU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=wwXi7Ghc; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=SXO97GJj; arc=none smtp.client-ip=103.168.172.155 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="wwXi7Ghc"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SXO97GJj" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 842A714000BA; Sun, 30 Aug 2026 17:15:19 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-03.internal (MEProxy); Sun, 30 Aug 2026 17:15:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1788124519; x=1788210919; bh=bEM9lm3a10 UgtLRSKZnSqUdhkFt4ZSsd5yht3b/5c5o=; b=wwXi7GhcUAhVbO2QIEtjbktfx+ OwSekXaAIkAokCgwg0uPO7v2+r5pvcY3aeeL9k19MM2dSyb8D/rka32UdaHtPjfW sHYxIWfeagx9RBl5B6ApGwrqYiFFQC+vgmTcU8bDjBfDAtAU17WCHJGMSkzjPBR0 ksCjXQt4ThRoDwuUEale7pH75W+ws2u8bsdXpJNQbGjKAf6jymSgSGAGI4oafvcG crzcLaUYt1Mphbgr4j1F/2oiGlgQSnC5NE9cGTF9oE5P6f05v1hxqjuL+/DZV45X pBBytcK7k7ERH91H7eIPduJBuGNbIditlU5OqUHLoJbKLdVIlYp2+IcnGDhQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1788124519; x=1788210919; bh=bEM9lm3a10UgtLR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BWlxNme5vg9qlj2hnhCddWm4g X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 30 Aug 2026 17:15:18 -0400 (EDT) From: Junio C Hamano To: "D. Ben Knoble" Cc: git@vger.kernel.org, Olamide Caleb Bello , Todd Zullinger , Tian Yuchen , Patrick Steinhardt Subject: Re: [PATCH v5 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec In-Reply-To: <01cd487cd23f23b1d18359b86fbcf18e25039e6d.1788010335.git.ben.knoble@gmail.com> (D. Ben Knoble's message of "Sat, 29 Aug 2026 09:38:20 -0400") References: <01cd487cd23f23b1d18359b86fbcf18e25039e6d.1788010335.git.ben.knoble@gmail.com> Date: Sun, 30 Aug 2026 14:15:17 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "D. Ben Knoble" writes: > + /* nanosecond timestamped files can also be racy! */ > + (repo_config_values(istate->repo)->use_nanosec > + ? (istate->timestamp.sec < sd->sd_mtime.sec || > + (istate->timestamp.sec == sd->sd_mtime.sec && > + istate->timestamp.nsec <= sd->sd_mtime.nsec)) > + : istate->timestamp.sec <= sd->sd_mtime.sec)); > } Currently this is probably fine, but the use of repo_config_values() here means that the order in which we can transition/libify two unrelated things are forced on us: * We'd first need to make sure repo_config_values() can work on an instance of repository that is not the_repository, * And until the above happens, we cannot do a --recurse-submodule option that loads the index in a submodule and operate on it in the same process (e.g., "git diff --resurse-submodules"), because immediately at this step, istate taken from a submodule would have its .repo member pointing at something that is not the_repository and we will hit a BUG(). And after writing all of the above, I realized that I am mostly repeating what Patric already said in the upstream, e.g., https://lore.kernel.org/git/an720tZnot07HYiK@pks.im/ Other than that, this looks good to me.