]> git.ipfire.org Git - thirdparty/git.git/commit
advice: allow disabling default branch name advice
authorJustin Tobler <jltobler@gmail.com>
Tue, 25 Mar 2025 00:51:48 +0000 (19:51 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Mar 2025 23:09:28 +0000 (16:09 -0700)
commitec0f362e869fc74c3c9f011ae2097daa1c938833
tree02605c0691791c40b778e51a3fd659fa784d7095
parentc039a46e99541042554c52bdad2fb10ac5a1e97d
advice: allow disabling default branch name advice

The default branch name advice message is displayed when
`repo_default_branch_name()` is invoked and the `init.defaultBranch`
config is not set. In this scenario, the advice message is always shown
even if the `--no-advice` option is used.

Adapt `repo_default_branch_name()` to allow the default branch name
advice message to be disabled with the `--no-advice` option and
corresponding configuration.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Acked-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
advice.c
advice.h
refs.c
t/t0001-init.sh