From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (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 2F125224234 for ; Thu, 4 Jun 2026 01:09:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780535369; cv=none; b=TLUeA7VpMQMYWvCeDGUpaAwu2/oKE9ZfCod+ToowG9LFhSRcJ673DGAXUNK2cILAu+tYFZWq2olq7vyYX3wNNd9FjCcJD/Zj3MjLIgsvpUb3ecI16OQs9cU75HLz3gRw29Y3gw14iQXnJ0QF1/qgcyvSxu+Zcfrb45g3XusepOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780535369; c=relaxed/simple; bh=WeNkBdRsXGJCnkbORLyWxa+6s4nFMLW1PE9ZoUdPgfI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=eUDLqMNpO+guYXE10vHY5Q90m1YJjMIGFN1a+7vIRdxVVexI1uzVYPBTEzrOO4gXZFfgCY63HqWQmTNgsQbDGLc3LqUEN2XlePqtdtHhnlcUQRH5bgoKVDe5CU4ChenV7hhxW0SCec25j6kUbKB3Fv/BvK0SphcWPO0XEVBvlzw= 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=JS4RuUks; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=dO2OKR63; arc=none smtp.client-ip=103.168.172.158 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="JS4RuUks"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="dO2OKR63" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3417C14000CC; Wed, 3 Jun 2026 21:09:27 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-04.internal (MEProxy); Wed, 03 Jun 2026 21:09:27 -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=1780535367; x=1780621767; bh=O9R7X4LQ1Q /SEKhtcJksHcNTAgvBEbgBBOHz6aqqwMo=; b=JS4RuUksDsWB+lqW/Qaix/uT8N hwIe3PWUbNOGbZQhk+DJ8yxjXIXi9OoQO4+sM4H6CI1tSYZ5LsDrid0Gge2N4jl4 VK02/EuUdPZvqd025FLvD827vLnDmzscFrAD1Pf8jlQ/G6rH7X0RZTH9I2RxRdbl aIxcxUM0NXmj7C5XsAsxAY8AM+cMAjjN7r5JXGSE9qAAGz6EZ++EUPoKC/aXTwXh Ab141J6Ac4pDJnnnUuFUowfClrntnm2O8jlIevTLoHJ76Ue3XePoV4VLK6jYyU6J S5qAXzeaaGqaXMpoob7e8h6V0diXEf8p1l3WXTCal1Ctwg9djhQa4pbVZNpg== 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= 1780535367; x=1780621767; bh=O9R7X4LQ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fW4M1Wz/GUZfbXAbRc/5eNlth8K8w X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Jun 2026 21:09:26 -0400 (EDT) From: Junio C Hamano To: Harald Nordgren Cc: Harald Nordgren via GitGitGadget , git@vger.kernel.org, Kristoffer Haugsbakk Subject: Re: [PATCH v5 1/2] config: let git_config_parse_key() validate quietly In-Reply-To: (Harald Nordgren's message of "Tue, 2 Jun 2026 18:31:36 +0200") References: Date: Thu, 04 Jun 2026 10:09:25 +0900 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 Harald Nordgren writes: >> Perhaps the updated "git_config_parse_key()" in this patch should be >> renamed to be a file-scape static internal helper, and the existing >> "git_config_parse_key()" should become a thin wrapper around that >> new helper function, retaining the current external interface, >> requiring no changes to existing callers. > > I want to remember a discussion on one of my earlier topics, a few > months back, where someone else suggested instead of introducing two > thin wrappers over a helper, we should update the callers instead. > > But for me either way is fine, maybe here it makes more sense, because > of the repeated NULL/0/1 parameters. If the "quiet" and "store_key" setting were independent, then I wouldn't have made such a suggestion. But I got an impression that with the updated code, there wasn't a valid use case to ask to quietly store the discovered key. An ideal refactoring would have been a low level helper function that only yields error code, and git_config_parse_key() would call it and react to the returned error code, stores the discovered key, and produces error message on its own. Then such an "always quiet" helper can be used for the purpose of the new caller, without having to have "if (!quiet)" sprinkled all over. But that is certainly cumbersome to arrange.