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

Re: [PATCH v1 2/2] reset: add new reset.quietDefault config setting

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 23, 2018, 09:13 UTC
Message-ID
<874lddc9fs.fsf@evledraar.gmail.com>
In-Reply-To
<20181017182337.GD28326@sigill.intra.peff.net>
On Wed, Oct 17 2018, Jeff King wrote:
Show 20 quoted lines
> On Wed, Oct 17, 2018 at 02:19:59PM -0400, Eric Sunshine wrote:
>
>> On Wed, Oct 17, 2018 at 12:40 PM Ben Peart <peartben@gmail.com> wrote:
>> > Add a reset.quietDefault config setting that sets the default value of the
>> > --quiet flag when running the reset command.  This enables users to change
>> > the default behavior to take advantage of the performance advantages of
>> > avoiding the scan for unstaged changes after reset.  Defaults to false.
>>
>> As with the previous patch, my knee-jerk reaction is that this really
>> feels wrong being tied to --quiet. It's particularly unintuitive.
>>
>> What I _could_ see, and what would feel more natural is if you add a
>> new option (say, --optimize) which is more general, incorporating
>> whatever optimizations become available in the future, not just this
>> one special-case. A side-effect of --optimize is that it implies
>> --quiet, and that is something which can and should be documented.
>
> Heh, I just wrote something very similar elsewhere in the thread. I'm
> still not sure if it's a dumb idea, but at least we can be dumb
> together.

Same here. I'm in general if favor of having the ability to configure porcelain command-line options, but in this case it seems like it would be more logical to head for something like:

    core.uiMessaging=[default,exhaustive,lossyButFaster,quiet]

Where default would be our current "exhaustive", and this --quiet case would be covered by lossyButFaster, but also things like the "--no-ahead-behind" flag for git-status.

Just on this implementation: The usual idiom for flags as config is command.flag=xyz, not command.flagDefault=xyz, so this should be reset.quiet.

Previous: Jeff KingNext: Ben Peart
Message 14 of 63 in “speed up git reset”
  1. 0/2 speed up git resetBen Peart, Oct 17, 2018
  2. 1/2 reset: don't compute unstaged changes after reset when --quietBen Peart, Oct 17, 2018
  3. Eric SunshineOct 17, 2018
  4. Jeff KingOct 17, 2018
  5. Junio C HamanoOct 18, 2018
  6. Jeff KingOct 18, 2018
  7. Ben PeartOct 18, 2018
  8. Duy NguyenOct 18, 2018
  9. Ben PeartOct 18, 2018
  10. Junio C HamanoOct 19, 2018
  11. 2/2 reset: add new reset.quietDefault config settingBen Peart, Oct 17, 2018
  12. Eric SunshineOct 17, 2018
  13. Jeff KingOct 17, 2018
  14. Ævar Arnfjörð BjarmasonOct 23, 2018
  15. Ben PeartOct 23, 2018
  16. Jeff KingOct 23, 2018
  17. Ævar Arnfjörð BjarmasonOct 23, 2018
  18. Recommended configurations (was Re: [PATCH v1 2/2] reset: add new reset.quietDefault config setting)Derrick Stolee, Oct 24, 2018
  19. Jeff KingOct 24, 2018
  20. Junio C HamanoOct 25, 2018
  21. 0/3 speed up git resetBen Peart, Oct 19, 2018
  22. 1/3 reset: don't compute unstaged changes after reset when --quietBen Peart, Oct 19, 2018
  23. 2/3 reset: add new reset.quiet config settingBen Peart, Oct 19, 2018
  24. Eric SunshineOct 19, 2018
  25. Jeff KingOct 19, 2018
  26. Eric SunshineOct 19, 2018
  27. Jeff KingOct 19, 2018
  28. Ben PeartOct 19, 2018
  29. Jeff KingOct 19, 2018
  30. Junio C HamanoOct 22, 2018
  31. Ben PeartOct 19, 2018
  32. 3/3 reset: warn when refresh_index() takes more than 2 secondsBen Peart, Oct 19, 2018
  33. 0/3 speed up git resetBen Peart, Oct 22, 2018
  34. 1/3 reset: don't compute unstaged changes after reset when --quietBen Peart, Oct 22, 2018
  35. Johannes SchindelinOct 22, 2018
  36. Ben PeartOct 22, 2018
  37. Johannes SchindelinOct 23, 2018
  38. Duy NguyenOct 23, 2018
  39. Johannes SchindelinOct 23, 2018
  40. 2/3 reset: add new reset.quiet config settingBen Peart, Oct 22, 2018
  41. Duy NguyenOct 22, 2018
  42. Ben PeartOct 23, 2018
  43. Junio C HamanoOct 24, 2018
  44. Junio C HamanoOct 24, 2018
  45. Duy NguyenOct 24, 2018
  46. Junio C HamanoOct 25, 2018
  47. Duy NguyenOct 24, 2018
  48. Ramsay JonesOct 22, 2018
  49. Jeff KingOct 22, 2018
  50. Ben PeartOct 23, 2018
  51. Jeff KingOct 23, 2018
  52. 3/3 reset: warn when refresh_index() takes more than 2 secondsBen Peart, Oct 22, 2018
  53. Junio C HamanoOct 23, 2018
  54. Ben PeartOct 23, 2018
  55. 0/3 speed up git resetBen Peart, Oct 23, 2018
  56. 1/3 reset: don't compute unstaged changes after reset when --quietBen Peart, Oct 23, 2018
  57. 2/3 reset: add new reset.quiet config settingBen Peart, Oct 23, 2018
  58. Ramsay JonesOct 24, 2018
  59. Junio C HamanoOct 25, 2018
  60. Junio C HamanoOct 25, 2018
  61. Ben PeartOct 25, 2018
  62. Ramsay JonesOct 25, 2018
  63. 3/3 reset: warn when refresh_index() takes more than 2 secondsBen Peart, Oct 23, 2018

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.