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

Re: [PATCH 0/2] advice: add "all" option to disable all hints

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Apr 24, 2024, 13:52 UTC
Message-ID
<7d1d2892-d486-4e91-b100-e44c1d76893c@gmail.com>
In-Reply-To
<ZiirKgXQPLmtrwLT@tanuki>
Hi Patrick
On 24/04/2024 07:48, Patrick Steinhardt wrote:
Show 9 quoted lines
> On Tue, Apr 23, 2024 at 11:28:03PM -0700, Junio C Hamano wrote:
>> Do not close that communication channel on us.
> 
> While I agree that it might not be a good idea to set it for our users,
> the usecase mentioned by this patch series is scripting. And here I very
> much agree with the sentiment that it makes sense to give an easy knob
> to disable all advice (disclosure: James is part of the Gitaly team at
> GitLab, and that is where this feature comes from, so I am very much
> biased).

Maybe an environment variable would be a better fit for turning advice off in scripts?

Show 5 quoted lines
> It has happened multiple times to us that new advices were introduced
> that then subsequently caused regressions in Gitaly because the output
> of Git commands now looks different. While addressing such breakage is
> easy enough to do, it does add up if we have to run Git with every
> single advice that we may hit turned off individually.

I'm sure you've considered these suggestions but (a) would it be possible for Gitaly to filter out lines beginning with "hint: " when it captures the output of commands and (b) would it be possible to have a script that parses advice_setting in advice.c to find the list of advice names so Gitaly can disable them? I think (a) would still leave some advice output from code that uses advice_enabled() rather than advise_if_enabled() but it should get rid of most of the advice messages.

Best Wishes
Phillip
Show 16 quoted lines
> Now one could say that we shouldn't execute porcelain tools in our
> scripts because it is kind of expected that their output may change at
> any point in time, and that is certainly true. But the reality is that
> there aren't always good plumbing alternatives available.
> 
> Furthermore, we are often forced to parse fragile error messages from
> such porcelain tools because Git doesn't provide a better way to dissect
> errors. Error codes are mostly meaningless and there is no other data
> channel available to us than the error message.
> 
> These are problems that run deeper than "We want to disable advices",
> and we eventually want to address those over time. But it's a long road
> to get there, and meanwhile disabling all advice would be something that
> helps us make our scripted uses of Git at least a tiny bit more stable.
> 
> Patrick
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 8 of 67 in “advice: add "all" option to disable all hints”
  1. 0/2 advice: add "all" option to disable all hintsJames Liu, Apr 24, 2024
  2. 1/2 advice: allow advice type to be provided in testsJames Liu, Apr 24, 2024
  3. Patrick SteinhardtApr 24, 2024
  4. 2/2 advice: add "all" option to disable all hintsJames Liu, Apr 24, 2024
  5. Patrick SteinhardtApr 24, 2024
  6. Junio C HamanoApr 24, 2024
  7. Patrick SteinhardtApr 24, 2024
  8. Phillip WoodApr 24, 2024
  9. Patrick SteinhardtApr 24, 2024
  10. Junio C HamanoApr 24, 2024
  11. Patrick SteinhardtApr 25, 2024
  12. Junio C HamanoApr 25, 2024
  13. Dragan SimicApr 24, 2024
  14. Dragan SimicApr 24, 2024
  15. Junio C HamanoApr 24, 2024
  16. Patrick SteinhardtApr 25, 2024
  17. Dragan SimicApr 24, 2024
  18. 0/1 advice: add --no-advice global optionJames Liu, Apr 29, 2024
  19. 1/1 advice: add --no-advice global optionJames Liu, Apr 29, 2024
  20. Dragan SimicApr 29, 2024
  21. James LiuApr 29, 2024
  22. Dragan SimicApr 29, 2024
  23. Dragan SimicApr 29, 2024
  24. Eric SunshineApr 29, 2024
  25. Dragan SimicApr 29, 2024
  26. Jeff KingApr 29, 2024
  27. Dragan SimicApr 29, 2024
  28. Junio C HamanoApr 29, 2024
  29. James LiuApr 30, 2024
  30. Junio C HamanoApr 29, 2024
  31. Rubén JustoApr 29, 2024
  32. Dragan SimicApr 29, 2024
  33. 0/1 advice: add --no-advice global optionJames Liu, Apr 30, 2024
  34. 1/1 advice: add --no-advice global optionJames Liu, Apr 30, 2024
  35. Patrick SteinhardtApr 30, 2024
  36. Dragan SimicApr 30, 2024
  37. Junio C HamanoApr 30, 2024
  38. 0/3 advice: add "all" option to disable all hintsJames Liu, May 3, 2024
  39. 1/3 doc: clean up usage documentation for --no-* optsJames Liu, May 3, 2024
  40. Junio C HamanoMay 3, 2024
  41. James LiuMay 6, 2024
  42. 2/3 doc: add spacing around paginate optionsJames Liu, May 3, 2024
  43. Karthik NayakMay 3, 2024
  44. Junio C HamanoMay 3, 2024
  45. 3/3 advice: add --no-advice global optionJames Liu, May 3, 2024
  46. 4/3 t0018: two small fixesJunio C Hamano, May 8, 2024
  47. Dragan SimicMay 3, 2024
  48. Re* [PATCH v4 0/3] advice: add "all" option to disable all hintsJunio C Hamano, May 3, 2024
  49. Eric SunshineMay 3, 2024
  50. Junio C HamanoMay 3, 2024
  51. Junio C HamanoMay 3, 2024
  52. Eric SunshineMay 3, 2024
  53. Johannes SchindelinMay 5, 2024
  54. Re* Re* [PATCH v4 0/3] advice: add "all" option to disable all hintsJunio C Hamano, May 6, 2024
  55. Dragan SimicMay 7, 2024
  56. Junio C HamanoMay 7, 2024
  57. Dragan SimicMay 7, 2024
  58. Dragan SimicMay 7, 2024
  59. Karthik NayakMay 3, 2024
  60. James LiuMay 5, 2024
  61. Junio C HamanoMay 3, 2024
  62. James LiuMay 5, 2024
  63. James LiuMay 6, 2024
  64. Junio C HamanoMay 6, 2024
  65. James LiuMay 6, 2024
  66. Karthik NayakMay 7, 2024
  67. Junio C HamanoMay 6, 2024

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.