From: Delilah Ashley Wu <delilahwu@linux.microsoft.com>
To: Junio C Hamano <gitster@pobox.com>
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>
Subject: Re: [PATCH v2 2/3] config: let sequence require a successful file
Date: Fri, 9 Oct 2026 20:11:41 +1100 [thread overview]
Message-ID: <asivbJyLJ3QbehBf-delilahwu@linux.microsoft.com> (raw)
In-Reply-To: <xmqqy0dsg2vt.fsf@gitster.g>
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.
next prev parent reply other threads:[~2026-10-09 9:11 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 1:14 [PATCH/RFC 0/4] config: read both home and xdg files for --global Delilah Ashley Wu via GitGitGadget
2025-10-10 1:14 ` [PATCH/RFC 1/4] cleanup_path: force forward slashes on Windows Delilah Ashley Wu via GitGitGadget
2025-11-19 17:47 ` Junio C Hamano
2025-10-10 1:14 ` [PATCH/RFC 2/4] config: test home and xdg files in `list --global` Delilah Ashley Wu via GitGitGadget
2025-11-19 18:29 ` Junio C Hamano
2025-10-10 1:14 ` [PATCH/RFC 3/4] config: read global scope via config_sequence Delilah Ashley Wu via GitGitGadget
2025-11-19 18:39 ` Junio C Hamano
2025-10-10 1:14 ` [PATCH/RFC 4/4] config: keep bailing on unreadable global files Delilah Ashley Wu via GitGitGadget
2025-10-10 1:27 ` [PATCH/RFC 0/4] config: read both home and xdg files for --global Kristoffer Haugsbakk
2025-11-22 1:36 ` Delilah Ashley Wu
2026-01-20 20:41 ` Junio C Hamano
2025-11-17 13:29 ` Johannes Schindelin
2025-11-18 0:28 ` Junio C Hamano
2025-11-19 14:44 ` Junio C Hamano
2025-11-22 2:00 ` Delilah Ashley Wu
2026-08-23 10:28 ` [PATCH v2 0/3] " Delilah Ashley Wu
2026-08-23 10:28 ` [PATCH v2 1/3] path: use forward slashes in XDG config on Windows Delilah Ashley Wu
2026-08-26 17:58 ` Junio C Hamano
2026-09-10 4:48 ` Delilah Ashley Wu
2026-10-09 2:49 ` Delilah Ashley Wu
2026-08-23 10:28 ` [PATCH v2 2/3] config: let sequence require a successful file Delilah Ashley Wu
2026-08-26 18:20 ` Junio C Hamano
2026-10-09 9:11 ` Delilah Ashley Wu [this message]
2026-08-23 10:28 ` [PATCH v2 3/3] config: read global scope via config_sequence Delilah Ashley Wu
2026-08-26 18:38 ` Junio C Hamano
2026-08-23 12:36 ` [PATCH v2 0/3] config: read both home and xdg files for --global Chris Torek
2026-08-24 1:32 ` Junio C Hamano
2026-10-09 8:51 ` [PATCH v3 0/2] " Delilah Ashley Wu
2026-10-09 8:51 ` [PATCH v3 1/2] t1300: test list with missing global config Delilah Ashley Wu
2026-10-09 8:51 ` [PATCH v3 2/2] config: read global scope via config_sequence Delilah Ashley Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=asivbJyLJ3QbehBf-delilahwu@linux.microsoft.com \
--to=delilahwu@linux.microsoft.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=ben.knoble@gmail.com \
--cc=delilahwu@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=nils@fahldieck.de \
--cc=ps@pks.im \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.