Re: [PATCH v2 1/3] remote: allow `guess_remote_head()` to suppress advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Justin

On 24/03/2025 15:21, Justin Tobler wrote:
On 25/03/24 09:31AM, Phillip Wood wrote:
On 21/03/2025 23:16, Justin Tobler wrote:
The `repo_default_branch_name()` invoked through `guess_remote_head()`
is configured to always display the default branch advice message.

Adapt `guess_remote_head()` to accept flags and convert the `all`
parameter to a flag.

This makes sense if we want to convert the boolean argument to a flags
argument. However the only callers that do not set `all` when calling this
function are in git clone where we don't want to emit the warning. It is
probably not worth a re-roll but I wonder if we really need to do this
conversion or if we should just hard code guess_remote_head() to be quiet
when it calls repo_default_branch_name()

Good point. We could just rely on the fact that all current
`guess_remote_head()` callers that do not set `all` also do not want the
advice to be printed.

I have a slight preference to keep this as-is and favor the explicit
configuration, but ultimately I don't feel strongly either way. I am
open to change in a followup version though. :)

I'm fine either way so lets keep it as-is if you want

Thanks

Phillip





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux