From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.146]) (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 C2BBC3FE359 for ; Wed, 9 Sep 2026 21:39:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.146 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788989983; cv=none; b=Pi20Y/U9W+ETLpDTrKOjq2pxJCucdh0a2WRzwDHSyXACXsPW+QvnHVoBorYpFWRgPsT9h0c7hXP4DTWn9D3EjFin2UtRyGD51Zz4eAZOwUiHBycWlIj00/Ac98rL8O8pfdCT5/6XGFymuk6jdaqNcmCCtO8b/KIV2suicMX/+9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788989983; c=relaxed/simple; bh=YAPmRhj4aolfFzOoE+bjAVRV9DPm5Dpl2f27jS+yxW0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=O9vpC86rxhUERGFTFfVuj15hBteVBR45SdT+cyb1+YWs8Kx4zKPhfypHQeFFlM734OaDQiUbp5nKQuA8GU1l+iYoX+umBdVq0othZofcLFjok5yHBsykcHdNyMrYRLrro6x1T/u4mjqZcfLAglT4gApwPQvNYJ9i5I8NUSYXX7I= 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=ASaUL+fl; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=fXRE8IvW; arc=none smtp.client-ip=103.168.172.146 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="ASaUL+fl"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="fXRE8IvW" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id A3EF5EC030A; Wed, 9 Sep 2026 17:39:31 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-05.internal (MEProxy); Wed, 09 Sep 2026 17:39:31 -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=fm3; t=1788989971; x=1789076371; bh=WeCAevBK36 tlaafgJ+zXgg3DquPmRCfZjiOSOyl1SMs=; b=ASaUL+flAhsCldo6z8RywSzLZz 9lyu1iXM/ww+61HMHorTVSrdIrtYKHdXgV2pXFXVcPuCS1zX73yzyfXalQ/cSVop dq+BhK33PcZxQ1j1mRNh5kmc2shjF3z2aqoX7c9On5R57hLeTVFzqZntpXModS7W VZkuHLx5gYO7OnYKtLb40M/iGOdnl2LRY+ztXiWE71XiIEQPL2mW044wgmni+kVi HnMuKf6JTmoBa5hCTrn0jNZOGtgrFeX/sSi2940xDFmYY4mvQ6TjUlmrUGDrREl0 IVmxGUfUKtyEkpqWPOgdAonbxoqp9yZrXmCOJs7WEIyYJOwncqzezwUDn5ng== 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=fm1; t= 1788989971; x=1789076371; bh=WeCAevBK36tlaafgJ+zXgg3DquPmRCfZj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llmxAaExHHcDQ X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Sep 2026 17:39:31 -0400 (EDT) From: Junio C Hamano To: Christian Couder Cc: git@vger.kernel.org, "brian m . carlson" , Patrick Steinhardt , Karthik Nayak , Jeff King , Elijah Newren Subject: Re: [PATCH v3 4/5] promisor-remote: prevent infinite recursion when lazy fetching In-Reply-To: (Christian Couder's message of "Wed, 9 Sep 2026 12:00:51 +0200") References: <20260813154748.2378747-1-christian.couder@gmail.com> <20260908164129.560396-1-christian.couder@gmail.com> <20260908164129.560396-5-christian.couder@gmail.com> Date: Wed, 09 Sep 2026 14:39:29 -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 Christian Couder writes: > I agree that using a plain "int" seems like the most straightforward, > but we don't have git_env_int() while we have git_env_ulong(). > > So would you be fine with something like: > > int depth = (int)git_env_ulong(LAZY_FETCH_DEPTH_ENVIRONMENT, 0); > > which is similar to the following in builtin/pack-objects.c: > > name_hash_version = (int)git_env_ulong("GIT_TEST_NAME_HASH_VERSION", 1); > > ? Or do you think it's time to introduce git_env_int() in a preparatory patch? There are 13 existing callers, among which one that you found explicitly casts to int, but many others make assignments with implicit cast (e.g., members of bloom_settings used in commit-graph.c are of type uint32_t), and config.c reads GIT_TEST_INDEX_THREADS into an "int val" with implicit cast. progress.c:get_defalut_delay() does the same. So I would say that it is up to you to pile on existing technical debt by mimicking config.c:repo_config_get_index_threads() and progress.c:get_default_delay(), or audit all callers of git_env_ulong() and migrate appropriate ones among them to use git_env_int(). From my cursory survey, I suspect that not many callers of git_get_ulong() would survive. Thanks.