From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 B342A405F7 for ; Fri, 26 Jun 2026 21:45:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782510308; cv=none; b=kYz+gNVSh2wS+/8hXRSORY+VVEgfIZW2ZtzU2n//7ZibZ2e4OWwvaCzibEaJ31K9YFYnZ8RKPVdMrta+ZVOKJWFJDPeCeE5xciI0V30Ai/1i2lW8gToElT+zkDSDsNMXv2QlhiFvudzJA6tIcGvEuAsxNd17WbMuLStdHsK4b+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782510308; c=relaxed/simple; bh=zWgLEMD/Sx4SNxY4UQL2/U0CWXD7wXiC1hu8lgOMXwE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=bd8Gm5MRCKUUtXZf+r44D51ASSZAeR3NIeRJ7a1h2qV/3Rp1D2Uwk7VPY9587wWWy0tEJ50r1jyIAsvrOAwwghFNv8O8Gb7AqX6lGzilC9axMH9tNcoDaxb3CUr/tllVfRxr9m6z8V3SmP4q8dFMusKG1itMxWF6HQy/OxPeAw4= 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=V6X6Bouj; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=PfnoDDyT; arc=none smtp.client-ip=202.12.124.156 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="V6X6Bouj"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="PfnoDDyT" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id E837D7A0137; Fri, 26 Jun 2026 17:45:05 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-04.internal (MEProxy); Fri, 26 Jun 2026 17:45:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-transfer-encoding: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=1782510305; x=1782596705; bh=S41gFudXXz/kNmwWJvDAYwPSR/tWKaf+jB05sjfUYkg=; b= V6X6BoujYKs2vPflTdfJOj+kiHuQnnix57nqsvNwRhEaWFEhzQOS0GFoDK+/cOoa kGi3i0sygMac0nxEUUZH1dk0jH3o3Akp1A0uPH129kCzdOh/HwEagRFA8bIi5jwH fBjO9vPcw/O5LdgRkPEBlUEt6JVh9FYBZzr8IHiP2FtGcm4CQ6oplJAYKSmHmMlm TRKGzzccXaok1xNjScPDo8wY0oVepS9tnnOXrWeHy/lU1sPpfk1t8rH7cmVrvPAt AMQHpyqYYGYEpvNaGd7n+6JoWq7dZ0Dpq5EAQc2qkmiGvQmPbpqPPtplgGNZftDW r2Jp2v2L1ynvR70CVXYNTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1782510305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ZX2gWxIpnCNHkn1Q58hCDgsYZScOQklh4Lg9SM5N5PU7FA X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Jun 2026 17:45:05 -0400 (EDT) From: Junio C Hamano To: SZEDER =?utf-8?Q?G=C3=A1bor?= Cc: Tian Yuchen , git@vger.kernel.org, cirnovskyv@gmail.com, Christian Couder , Ayush Chandekar , Olamide Caleb Bello Subject: Re: [PATCH v2 1/2] dir: encapsulate excludes_file lazy-load In-Reply-To: ("SZEDER =?utf-8?Q?G=C3=A1bor?= =?utf-8?Q?=22's?= message of "Fri, 26 Jun 2026 23:14:30 +0200") References: <20260626075037.532164-1-cat@malon.dev> <20260626075037.532164-2-cat@malon.dev> Date: Fri, 26 Jun 2026 14:45:02 -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; charset=utf-8 Content-Transfer-Encoding: 8bit SZEDER Gábor writes: > On Fri, Jun 26, 2026 at 03:50:36PM +0800, Tian Yuchen wrote: >> diff --git a/environment.c b/environment.c >> index ba2c60103f..8efcaeafa6 100644 >> --- a/environment.c >> +++ b/environment.c >> @@ -134,6 +134,13 @@ int is_bare_repository(void) >> return is_bare_repository_cfg && !repo_get_work_tree(the_repository); >> } >> >> +const char *repo_excludes_file(struct repository *repo) >> +{ >> + if (!excludes_file) >> + excludes_file = xdg_config_home("ignore"); >> + return excludes_file; >> +} > > This function has a 'repo' parameter, which is not used in the > function at all. This causes build failure when trying to build this > commit using DEVELOPER=1: > > environment.c: In function ‘repo_excludes_file’: > environment.c:137:51: error: unused parameter ‘repo’ [-Werror=unused-parameter] > 137 | const char *repo_excludes_file(struct repository *repo) > | ~~~~~~~~~~~~~~~~~~~^~~~ > cc1: all warnings being treated as errors > make: *** [Makefile:2922: environment.o] Error 1 > > Please make sure that all commits can be built with 'make > DEVELOPER=1'. Good point. In this case, we can start with UNUSED in step 1/2 and then drop the UNUSED in the second step. I wonder how harder to read it would become if these two patches are squashed together... Thanks.