Thread (25 messages) flat view 25 messages, 4 authors, 4h ago
HOTtoday

[PATCH v4 3/3] advice: use global config for default branch name

From: Vsevolod Myalitsin <hidden>
Date: 2026-09-10 08:54:14
Subsystem: the rest · Maintainer: Linus Torvalds

The advice for setting the default branch name currently suggests
disabling it with a local configuration value.

This makes the advice appear 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.

Signed-off-by: Vsevolod Myalitsin <redacted>
---
 advice.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/advice.c b/advice.c
index 12a68ea716..6964a6e2ba 100644
--- a/advice.c
+++ b/advice.c
@@ -54,7 +54,7 @@ static struct advice_setting advice_setting[] = {
 	[ADVICE_AM_WORK_DIR] 				= { "amWorkDir" },
 	[ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME] 	= { "checkoutAmbiguousRemoteBranchName" },
 	[ADVICE_COMMIT_BEFORE_MERGE]			= { "commitBeforeMerge" },
-	[ADVICE_DEFAULT_BRANCH_NAME]			= { "defaultBranchName" },
+	[ADVICE_DEFAULT_BRANCH_NAME]			= { "defaultBranchName", CONFIG_SCOPE_GLOBAL },
 	[ADVICE_DETACHED_HEAD]				= { "detachedHead" },
 	[ADVICE_DIVERGING]				= { "diverging" },
 	[ADVICE_FETCH_SET_HEAD_WARN]			= { "fetchRemoteHEADWarn" },
-- 
2.50.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help