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

Recommended configurations (was Re: [PATCH v1 2/2] reset: add new reset.quietDefault config setting)

From
Derrick Stolee <stolee@gmail.com>
Date
Oct 24, 2018, 15:48 UTC
Message-ID
<29db5fed-4556-277e-7aad-7ff3233550a9@gmail.com>
In-Reply-To
<87zhv4bfck.fsf@evledraar.gmail.com>
On 10/23/2018 4:03 PM, Ævar Arnfjörð Bjarmason wrote:
Show 19 quoted lines
> [snip]
> The --ahead-behind config setting stalled on-list before:
> https://public-inbox.org/git/36e3a9c3-f7e2-4100-1bfc-647b809a09d0@jeffhostetler.com/
>
> Now we have this similarly themed thing.
>
> I think we need to be mindful of how changes like this can add up to
> very confusing UI. I.e. in this case I can see a "how take make git fast
> on large repos" post on stackoverflow in our future where the answer is
> setting a bunch of seemingly irrelevant config options like reset.quiet
> and status.aheadbehind=false etc.
>
> So maybe we should take a step back and consider if the real thing we
> want is just some way for the user to tell git "don't work so hard at
> coming up with these values".
>
> That can also be smart, e.g. some "auto" setting that tweaks it based on
> estimated repo size so even with the same config your tiny dotfiles.git
> will get "ahead/behind" reporting, but not when you cd into windows.git.

Generally, there are a lot of config settings that are likely in the "if you have a big repo, then you should use this" category. However, there is rarely a one-size-fits-all solution to these problems, just like there are different ways a repo can be "big" (working directory? number of commits? submodules?).

I would typically expect that users with _really_ big repos have the resources to have an expert tweak the settings that are best for that data shape and share those settings with all the users. In VFS for Git, we turn certain config settings on by default when mounting the repo [1], but others are either signaled through warning messages (like the status.aheadBehind config setting [2]).

We never upstreamed the status.aheadBehind config setting [2], but we _did_ upstream the command-line option as fd9b544 "status: add --[no-]ahead-behind to status and commit for V2 format". We didn't want to change the expected output permanently, so we didn't add the config setting to our list of "required" settings, but instead created a list of optional settings [3]; these settings don't override the existing settings so users can opt-out. (Now that we have the commit-graph enabled and kept up-to-date, it may be time to revisit the importance of this setting.)

All of this is to say: it is probably a good idea to have some "recommended configuration" for big repos, but there will always be power users who want to tweak each and every one of these settings. I'm open to design ideas of how to store a list of recommended configurations and how to set a group of config settings with one command (say, a "git recommended-config [small|large|submodules]" builtin that fills the local config with the important settings).

Thanks, -Stolee

[1] 
https://github.com/Microsoft/VFSForGit/blob/7daa9f1133764a4e4bd87014833fc2091e6702c1/GVFS/GVFS/CommandLine/GVFSVerb.cs#L79-L104
     Code in VFS for Git that enables "required" config settings.
[2] 
https://github.com/Microsoft/git/commit/0cbe9e6b23e4d9008d4a1676e1dd6a87bdcd6ed5
     status: add status.aheadbehind setting
[3] 
https://github.com/Microsoft/VFSForGit/blob/7daa9f1133764a4e4bd87014833fc2091e6702c1/GVFS/GVFS/CommandLine/GVFSVerb.cs#L120-L123
     Code in VFS for Git that enables "optional" config settings.
Previous: Ævar Arnfjörð BjarmasonNext: Jeff King
Message 18 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.