From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b2-smtp.messagingengine.com (fhigh-b2-smtp.messagingengine.com [202.12.124.153]) (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 45BE231282F for ; Sun, 28 Jun 2026 08:40:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.153 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782636022; cv=none; b=SaEvdWL4I/q/fACHNi8noPbfNOc9enC7O1xH2vHfZK/iX0sVSDRK9BIdoyzrvLm2Nz6XgrUawuSsEmFJvA6CS3ap9TSJidTzRLzb5l/NXD5HzeTATLaAecO5bJjIJc9EOyBMuSPMosabGqF9deV1+vCOxSHFVPh0i4u5WWDH16I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782636022; c=relaxed/simple; bh=Nx8Qn/634vRQ2UwC9J6kcwT9jm0ARjM7Je8IqOre+fk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=TykgnaYaS9NurQ1z6m6I3FEIvJ703kkCm0QUa0GOgRc2NGXNlxO7jbz5RRbz2PS43i2bBXfZNSnKSmeoS7gsEBPifDbAlOTdzclw9tqNizcdFx1EOBUBkGKC6xz/dVZqoSE0HG4LY5pSIYqp+i9Je2JZLX7qpO71ux9P2+aIjJg= 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=AVlKl3eo; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=OqY6Pt83; arc=none smtp.client-ip=202.12.124.153 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="AVlKl3eo"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="OqY6Pt83" Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id 0FF787A0085; Sun, 28 Jun 2026 04:40:19 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-01.internal (MEProxy); Sun, 28 Jun 2026 04:40: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=fm3; t=1782636018; x=1782722418; bh=XW7sgaxpjG dTrAMImxYBE/71M8xa83QSao1+I/xWuGA=; b=AVlKl3eosXtIqB+GE7GVKy1cR0 zW+HLS1lLHCD5vf2owEQm4rRS0k7dJI7+gQLRSOYOZ2BjZnp5ZTof6gRXrrQ33RM KwUqHo1ulk5I+YAw3nGp6IklhU2YiZfcDWFay8C+jzBkk6BMS8CnJ9672djLUX4C WYT3Dm+I7nnMU5DFx5ebT8KQIPCvgvGh2Sq5KBMYfe1/9xzl/0fvHFzZM2dK/Z+i PORVc3/9G69xNTXQBQEWdVR79EEr7H/9JtWUIr+DvPdEfPvHuunSlq3+G9WIP2nX 2us3LlzgcGDJh6CBzgUtsNdeZa3ghBtscBgp4pYJC+iZFeQ5+CHTSMR7JVCA== 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= 1782636018; x=1782722418; bh=XW7sgax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xKBfnrRaHBB7h/f9np+tuoOIQ X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 28 Jun 2026 04:40:18 -0400 (EDT) From: Junio C Hamano To: Tian Yuchen Cc: git@vger.kernel.org, cirnovskyv@gmail.com, szeder.dev@gmail.com, Christian Couder , Ayush Chandekar , Olamide Caleb Bello Subject: Re: [PATCH v4 1/1] environment: move excludes_file into repo_config_values In-Reply-To: (Tian Yuchen's message of "Sun, 28 Jun 2026 11:19:55 +0800") References: <20260626075037.532164-1-cat@malon.dev> <20260627160813.1074201-1-cat@malon.dev> <20260627160813.1074201-2-cat@malon.dev> <04d1a7d5-ef83-4728-b816-5cdf1cb4aa25@malon.dev> Date: Sun, 28 Jun 2026 01:40:16 -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 Tian Yuchen writes: >> Wouldn't we rather want to try to be more strict and say >> >> if (!repo || !repo->initialized) >> BUG("repo must be an initialied repository"); >> >> here? Aren't all the callers of this function supposed to be >> dealing with an already initialized repository? > > That makes sense, but from my point of view... > > 'repo_config_values()' already has a check for 'repo->initialized'. If > we're absolutely certain that the 'repo' is initialized, wouldn't it be > better to simply remove all the checks inside the getter and leave the > judgment to 'repo_config_values()'? Yes, that was what I was getting at ;-).