[PATCH v4 0/3] defaultBranchName advice is useless
From: Vsevolod Myalitsin <hidden>
Date: 2026-09-10 08:54:12
The advice for setting the default branch name currently suggests disabling it with the following command: git config set advice.defaultBranchName false Without an explicit scope, this command writes the setting to the current repository's configuration. This is not particularly useful here, since the advice is shown while initializing a repository, and the initialization scenario does not repeat for that repository. As a result, the setting only affects the repository where the advice has already been shown, while the advice appears again when a new repository is initialized. Suggest using the global configuration scope instead, so that disabling the advice applies to future repositories as well. This series prepares the advice infrastructure for specifying a configuration scope and then uses it for defaultBranchName advice. The series is structured as follows: 1. Pass the entire advice_setting structure to vadvise(). 2. Introduce a configuration scope hint for advice settings. 3. Suggest the global configuration scope for defaultBranchName advice. Vsevolod Myalitsin (3): advice: pass the entire advice_setting to vadvise() advice: introduce advice scoping mechanism advice: use global config for default branch name advice.c | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) -- 2.50.1