🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #158

Re: [PATCH v2 2/3] config: let sequence require a successful file

#158
From: Delilah Ashley Wu
Date: Fri, 09 Oct 2026 09:11
22 lines
6741 bytes
On Wed, Aug 26, 2026 at 11:20:22AM +1000, Junio C Hamano wrote:
> Delilah Ashley Wu <delilahwu@linux.microsoft.com> writes:
>> From: Delilah Ashley Wu <delilahwu@microsoft.com>
>> +static void attempt_git_config_from_file_with_options(config_fn_t fn,
>> [...]
>>  static int do_git_config_sequence(const struct config_options *opts,
>> +				  const struct repository *repo, config_fn_t fn,
>> +				  void *data, int require_successful_config)
>>  {
>>  	int ret = 0;
>> +	int success_count = 0;
>
> I am not convinced 100% that we need "success_count", either, until
> we see how it is used in the later steps.

Good point!! I realised that v2 overcomplicated the error handling. We
want to let `do_git_config_sequence()` optionally bail when both global
configuration files could not be read. We can simply set a boolean flag
when a global configuration file is successfully read, rather than
adding a helper function that tracks the number of successful reads.
I've corrected this in v3.
Technical Details
Message-ID: <asivbJyLJ3QbehBf-delilahwu@linux.microsoft.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-71553-linux-kernel-git=dewy.ru
References: <20260823-fix-config-list-global-home-and-xdg-v2-0-b29cc63f017b@microsoft.com> <20260823-fix-config-list-global-home-and-xdg-v2-2-b29cc63f017b@microsoft.com> <xmqqy0dsg2vt.fsf@gitster.g>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-71553-linux-kernel-git=dewy.ru
From: delilahwu@linux.microsoft.com (Delilah Ashley Wu)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v2 2/3] config: let sequence require a successful file
Date: Fri, 9 Oct 2026 20:11:41 +1100
Organization: Usenet Network
Message-ID: <asivbJyLJ3QbehBf-delilahwu@linux.microsoft.com>
References: <20260823-fix-config-list-global-home-and-xdg-v2-0-b29cc63f017b@microsoft.com>
 <20260823-fix-config-list-global-home-and-xdg-v2-2-b29cc63f017b@microsoft.com>
 <xmqqy0dsg2vt.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1070882"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:km89gapBVfzSmZaSrJCpXxMpsrc= sha256:wcfRuG9o77JzJzmXFHNFW5jiFVyIleeKmgsnCLNMYwc=
	sha1:i/gNK4Px8cHOevGXI1Gjm0dzHfg= sha256:mn+g2zQcF74cIk8aX5ZHrNXF20yyYdDDYtFXiKf3iaM=
Content-Disposition: inline
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 3685710F627; Fri,  9 Oct 2026 12:12:54 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.851
X-Spam-Status: No, score=-0.851 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.microsoft.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id P7bQu3N1Fqzv;
	Fri,  9 Oct 2026 12:12:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=git+bounces-71553-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id BC3C110F58B; Fri,  9 Oct 2026 12:12:43 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sto.lore.kernel.org (Postfix) with ESMTP id AF96F6082A7; Fri,  9 Oct 2026 09:11:54 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D7823D9041;
	Fri,  9 Oct 2026 09:11:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="RzLL6kPr"
X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 23216360EE1
	for <git@vger.kernel.org>; Fri,  9 Oct 2026 09:11:51 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791537112; cv=none; b=VxsIJlGR+4EV23fi7ECREMK7PJfKcsc6nbDi44ES0eBvHwXOvkU/2yYx2+UM6SHTfXrCMTjdJHZUk9Im7JMhoB+p95h+cofJXevmajuUFM5MH4zssoZNHuU1IfjInK2VrM/C7GUZI7yDxCf69/S6kwnIc7wS5TMzMxZvgi53Dno=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791537112; c=relaxed/simple;
	bh=5XGoifBmHKPAHjZqvugFC4LFacGcU1a3p66xFA1PRyU=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=rfTQwKJ1blytZKsmg0RqV/HWVTLC+kt4cWwaV7MUv8889fxHlHdWZqrCKqpWFpcfJMLevj1IExTL82jKlf0kF4HxMO0OaM4aJm5UBfUDeKXl0Xk8+SSewKKRH+uKlGb6Cwx6HNeMPUWEvPLSPk8/O1RJgloxhlS5zKop0uQRNwc=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=RzLL6kPr; arc=none smtp.client-ip=13.77.154.182
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com
X-Received: from MacBookPro (unknown [52.172.102.222])
	by linux.microsoft.com (Postfix) with ESMTPSA id B8BD420B716A;
	Fri,  9 Oct 2026 02:11:45 -0700 (PDT)
X-DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B8BD420B716A
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
	s=default; t=1791537109;
	bh=6llUFdUU0+v+2SO9s+Mpq1l70K3GPoGiHKqtocx/fbA=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
	b=RzLL6kPrFAsareQ34cy2HSBITpjQT5YSFyPv3Ir6aGhwdUwyIXtRC1pVXragyba5Q
	 gkaiKPNN7gVQN3rvH05L4dc4Eh0B1WSlg7xrfgZfMNoDMN4+fglHJLZ32ecHvtq8Nr
	 YuUiPPVSYuqtcH02VnHgCEJoKycJKvOa5emM+o1w=
X-Cc: git@vger.kernel.org, Nils Fahldieck <nils@fahldieck.de>, 
	Patrick Steinhardt <ps@pks.im>, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>, 
	Delilah Ashley Wu <delilahwu@microsoft.com>, Derrick Stolee <stolee@gmail.com>, 
	Ben Knoble <ben.knoble@gmail.com>, Johannes Schindelin <Johannes.Schindelin@gmx.de>
X-Precedence: bulk
X-Mailing-List: git@vger.kernel.org
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-In-Reply-To: <xmqqy0dsg2vt.fsf@gitster.g>