From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from send217.i.mail.ru (send217.i.mail.ru [95.163.59.56]) (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 A6057367B7E for ; Thu, 10 Sep 2026 08:54:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.163.59.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789030456; cv=none; b=tc/7tzvyuMcJnyM9N5JjvRz72QwhZm9dS4ZJ7tdyDfSpQeUHyU+iUB6rBXC/+FIUJdKjzgpjAfq7mqE0bYur/n3ukiUutsLmUB23ba5Zk2ztZ361Dr+JsBh7eaVUBMmxVJT5RfxRUI4heTsLMQAhtht6gnkWo4ltaqigvMWTDC0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789030456; c=relaxed/simple; bh=8FsKKl3Ypc2bDQybVRr/yZODhkJwCRt5eEhd8hUIdBI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=flwFl2FhVBts/2/ntIXx+Qsp+03fIyb5cfuJLSiYnDerH8vKeSFj6BbqYiAhwDSfkH848JsBMr4xlCWF37qIETk+fejZqCb5cVSfBOwcyNCTz7Z1Yz5eKRKm09JpItx69T+O3VUpM6K75UySmT8XCUzTLlC3DFJX3dujVXrtO08= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mail.ru; spf=pass smtp.mailfrom=mail.ru; dkim=pass (2048-bit key) header.d=mail.ru header.i=@mail.ru header.b=EAMKC9+X; arc=none smtp.client-ip=95.163.59.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mail.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mail.ru Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mail.ru header.i=@mail.ru header.b="EAMKC9+X" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail4; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:From:Sender:Reply-To:To:Cc:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive: X-Cloud-Ids:Disposition-Notification-To; bh=NZ/45isGRGoUvfdmnd1sm+ZIpjkOZfpAdYwTcIXoEVA=; t=1789030452; x=1789120452; b=EAMKC9+XH+emzQJFYSfeh7wCUOR3a0cz/H+Q1kCn7nAjRGbfQSkCOY41dDwianqnUkzSJ+teIVL ZM+2PN/l5Iz6B6D0YK2kJ11rPzO+i9enIQY45tD3gwojyS8IoPUDsmdjn7H30UwQDBurB0q9eDm/O fz1WF/LDz8uznRcj4x4ueRQfG9vF4vIytT1AN898iCVBnANoKsw+Qi+oLxtYBzHaXMDznt2vwQKPI J4hhhE2D9rA/HTUgOEEIOQ4JS/VAA/N/j3T2OMA+x0XCXO8THNSf94Ylbj4hRt95cwnEX3p8VBYUY 6tCnXBUjfjdW1mEhU5WIJYaQKpV4Z3LmjPfw==; Received: by exim-smtp-569b45c49c-tq5gj with esmtpa (envelope-from ) id 1x4aXj-00000000M0e-0Lxt; Thu, 10 Sep 2026 11:54:03 +0300 Received: from vatem (localhost.localdomain [127.0.0.1]) by vatem.localdomain (Postfix) with ESMTP id EF58B9F60D; Thu, 10 Sep 2026 11:54:01 +0300 (MSK) From: Vsevolod Myalitsin To: git@vger.kernel.org Cc: ub4nal@mail.ru, ben.knoble@gmail.org, gitster@pobox.me, peff@peff.net Subject: [PATCH v4 0/3] defaultBranchName advice is useless Date: Thu, 10 Sep 2026 11:53:50 +0300 Message-ID: <20260910085353.109373-1-ub4nal@mail.ru> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20270829004959.90983-1-ub4nal@mail.ru> References: <20270829004959.90983-1-ub4nal@mail.ru> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: exim-smtp-569b45c49c-tq5gj; auth=pass smtp.auth=ub4nal@mail.ru smtp.mailfrom=ub4nal@mail.ru X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD95F11291660A1073B7AF24265EE4178F06C30090CCB8B5916182A05F53808504082D47F3CC21017D53DE06ABAFEAF6705C043E21F253064311964E60332344D73B21206976FA500EF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE74323F140F3EE5B6AC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6759CC434672EE6371C2A783ECEC0211ADC4224003CC836476D5A39DEEDB180909611E41BBFE2FEB2B24181C086F0AA6A201E7FF503C91F58D9569EAF354FB7EF9489E429F22A8B6920C819B32DFABC24A725E5C173C3A84C3ADEF88395FA75C5F117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC55D5BE2F85BDEC5FA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB28585415E75ADA9F206494F22AA87D6D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3B355ED1E20F5346AC0837EA9F3D19764C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006372BF47D31460A3964EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5EADA052FCFED2F1E5002B1117B3ED696EB6C90D227999A0419AC5B239BAD4335823CB91A9FED034534781492E4B8EEAD2B25D9E4C92BC8ACC79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE1918E10F71CB4DF9F96AB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D659DF07DA0AFF403CEEC228DF63725A2FF8B574F687830A89BF862D9FF8005DDE332BCED66A785C4C61B8341EE9D5BE9A0AF8724212F5ADC659DA371726B8FD62A553C582E7984EFB5DC7CEAA0681F5848F4C41F94D744909CEFACD6B4B6D928230F8CCC96A59B602D5CC2E138FFB4ACBED X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXOcIETfglQORZ0zpDET4Zrk3igikrdHlWFpuP5d0Zh5a3KofJT2Itw4= X-Mailru-Sender: 288943BA7BCC8BBA2C509D5366AED3E5B676C78F813EF3620841F56765D88C407013D903C34D91564A23A71BF284EB2E3B7E521F6A5800A996940349D467AF430D26F6DE3BAD3FFE4DFFA654C60F801316CD019DBEDFC45331DC91172AC7F52EF91D4A7208CD43CE3DDE9B364B0DF289AE208404248635DF X-Mras: Ok 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