From: R4NC <ub4nal@mail.ru>
To: Junio C Hamano <gitster@pobox.com>
Cc: ben.knoble@gmail.com, git@vger.kernel.org
Subject: Re: [PATCH] advice: use global config for default branch name
Date: Wed, 9 Sep 2026 09:49:17 +0300 [thread overview]
Message-ID: <9b4f43d7-ba77-4859-8efe-facdec6ec5aa@mail.ru> (raw)
In-Reply-To: <xmqqik4fwoz5.fsf@gitster.g>
> One minor glitch is that there is an ad-hoc vadvise() call in
> advise() that is not tied to any particular entry in the
> advise_setting[] table.
I agree that we should use a separate "advice_setting" structure for this.
> I think we'd need to give a name to the advice_setting struct type,
> instanciate an ad-hoc instance on stack, and pass it down the callchain.
I agree. However, "advise()" originally passed "0" for
"display_instructions",
while "advise_if_enabled()" passed the negation of "level". With the new
interface,
we need a non-zero value for the ad-hoc setting to suppress the
instructions.
Using "ADVICE_LEVEL_ENABLED" or "ADVICE_LEVEL_DISABLED" would be a hack.
I suggest adding a dedicated "ADVICE_LEVEL_UNKNOWN" value to "enum
advice_level" for this case.
next prev parent reply other threads:[~2026-09-09 6:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 12:56 [PATCH] advice: use global config for default branch name Vsevolod Myalitsin
2026-09-08 13:35 ` Ben Knoble
2026-09-08 18:56 ` Vsevolod Myalitsin
2026-09-08 14:59 ` Ben Knoble
2026-09-08 19:56 ` R4NC
2026-09-08 16:24 ` D. Ben Knoble
2026-09-08 16:31 ` Junio C Hamano
2026-09-08 21:38 ` Vsevolod Myalitsin
2026-09-08 18:57 ` Junio C Hamano
2026-09-09 6:49 ` R4NC [this message]
2026-09-09 15:54 ` Jeff King
2026-09-09 18:51 ` Junio C Hamano
2026-09-09 19:51 ` Jeff King
2026-09-10 4:23 ` Junio C Hamano
2026-09-10 4:33 ` Jeff King
2026-09-10 12:18 ` Junio C Hamano
2026-09-10 16:31 ` Jeff King
2026-09-10 4:28 ` Junio C Hamano
2027-08-29 0:59 ` Vsevolod Myalitsin
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=9b4f43d7-ba77-4859-8efe-facdec6ec5aa@mail.ru \
--to=ub4nal@mail.ru \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox