git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Pphillip.wood123@gmail.com <phillip.wood123@gmail.com>
Date
Mar 24, 2025, 19:29 UTC
Message-ID
<884dc4b3-d470-46f6-b129-c6d20817daf7@gmail.com>
In-Reply-To
<3rcpapodk473swxbdgubhuqijvgwe6rz5iqsfykglsmjbanuu7@mh6tvrhyyrx5>
Hi Justin
On 24/03/2025 15:21, Justin Tobler wrote:
Show 22 quoted lines
> 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
Previous: Justin ToblerNext: Justin Tobler
Message 20 of 32 in “bug: git shows hints that should be suppressed”
  1. alan@norbauer.comMar 19, 2025
  2. alan@norbauer.comMar 19, 2025
  3. Elijah NewrenMar 19, 2025
  4. Justin ToblerMar 20, 2025
  5. 0/2 clone: suppress unexpected advice message during cloneJustin Tobler, Mar 20, 2025
  6. 1/2 remote: allow `guess_remote_head()` to suppress adviceJustin Tobler, Mar 20, 2025
  7. Patrick SteinhardtMar 20, 2025
  8. Justin ToblerMar 20, 2025
  9. Junio C HamanoMar 21, 2025
  10. 2/2 clone: suppress unexpected default branch adviceJustin Tobler, Mar 20, 2025
  11. Patrick SteinhardtMar 20, 2025
  12. Justin ToblerMar 20, 2025
  13. Phillip WoodMar 20, 2025
  14. Justin ToblerMar 20, 2025
  15. Phillip WoodMar 21, 2025
  16. 0/3 clone: suppress unexpected advice message during cloneJustin Tobler, Mar 21, 2025
  17. 1/3 remote: allow `guess_remote_head()` to suppress adviceJustin Tobler, Mar 21, 2025
  18. Phillip WoodMar 24, 2025
  19. Justin ToblerMar 24, 2025
  20. phillip.wood123@gmail.comMar 24, 2025
  21. 2/3 builtin/clone: suppress unexpected default branch adviceJustin Tobler, Mar 21, 2025
  22. Phillip WoodMar 24, 2025
  23. Justin ToblerMar 24, 2025
  24. 3/3 advice: allow disabling default branch name adviceJustin Tobler, Mar 21, 2025
  25. Phillip WoodMar 24, 2025
  26. Junio C HamanoMar 23, 2025
  27. 0/3 clone: suppress unexpected advice message during cloneJustin Tobler, Mar 25, 2025
  28. 1/3 remote: allow `guess_remote_head()` to suppress adviceJustin Tobler, Mar 25, 2025
  29. 2/3 builtin/clone: suppress unexpected default branch adviceJustin Tobler, Mar 25, 2025
  30. 3/3 advice: allow disabling default branch name adviceJustin Tobler, Mar 25, 2025
  31. Phillip WoodMar 25, 2025
  32. alan@norbauer.comMar 20, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.