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

Re: [PATCH] fsmonitor: long status advice adapted to the fsmonitor use case

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Oct 20, 2022, 12:56 UTC
Message-ID
<d696b07f-cfa9-be45-b6d2-adb72811a205@jeffhostetler.com>
In-Reply-To
<CANaDLWKcF07=FQgT7ZTKmcgworH45YdNy8hy2faMBg3CGYEf+w@mail.gmail.com>
On 10/17/22 12:59 PM, Rudy Rigot wrote:
Show 15 quoted lines
>> We should be careful here, FSMonitor only helps with untracked
> files if the untracked cache (UC) is also turned on.  They do work
> well together and they greatly speed up things, but if either is
> turned off, `git status` will still need to scan.
> 
> Oh, thanks, I didn't realize! With that, I agree that the messaging I'm
> proposing is not technically correct, and needs to be fixed.
> 
> I agree with your advice about the message when FSMonitor and
> untracked cache are both turned off. I'm also trying to think about
> what advice to give when they are turned on, and git status was
> slow because the update-index was building the cache on that call.
> 
> Importantly, I'm trying to think of ways to keep the messaging
> accessible even when the user is not familiar with those concepts.

Agreed. We sometimes forget that not everyone is an expert in the subtleties and terms of Git. Even the original message "...enumerate untracked files..." can be a little obscure to the casual user.

Show 39 quoted lines
> I'm thinking a user may not even know what is currently enabled or
> not in their environment, so there's probably value in detecting their
> situation, and best adapting the messaging to it.
> 
> For context, in our case, we set core.fsmonitor and core.untrackedCache
> as part of our dev environment setup script, because we don't expect
> our least advanced developers to ramp up on what they are. And yet,
> it is useful to all of them to have them enabled, our git status is about
> 30 seconds long without FSMonitor and UC.
> 
> As a result, we have been receiving negative feedback that git status is
> slow, but when we inform the user that it is cached, they run it again and
> confirm that it is fine like this. The problem being about educating
> users and not a technical issue, of course we're adding the info to our
> setup doc, but I figured other large repos may hit this usability issue, so
> here I am.
> 
> What do you think of those phrasings?
> 
> - If neither FSMonitor nor the untracked cache are turned on, changing
> the current advice to: "It took %.2f seconds to enumerate untracked files.
> You may want to skip that part with 'status -uno' but you have to be
> careful not to forget to add new files yourself (see 'git help status').
> Otherwise, you can enable the core.untrackedCache config to have
> it be cached, and potentially the core.fsmonitor config to further improve
> the cache's performance."
> 
> - If only the untracked cache is turned on, since you said it could already
> improve some: "It took %.2f seconds to enumerate untracked files.
> Your untracked cache is enabled, but you may want to enable the
> core.fsmonitor config to further improve the cache's performance.
> Otherwise, you may want to skip that part with 'status -uno' but you have
> to be careful not to forget to add new files yourself (see 'git help status')."
> 
> - If they're both turned on: "It took %.2f seconds to enumerate untracked
> files. Your untracked cache is enabled and fsmonitor is on,
> so your next calls may be faster. Otherwise, you may want to skip that part
> with 'status -uno' but you have to be careful not to forget to add new
> files yourself (see 'git help status')."

All three of these are a bit wordy and/or awkward -- but I'm not sure how to say it either, so don't feel bad. I think it is just the quality of the corner that we've been backed into -- there are just too many knobs and not enough space to do them justice. And I've always found the "turn this on, but be careful..." advice/warning a bit odd.

As an alternative, and definitely just thinking out loud here.

Would it be better to add a "Untracked Files and Status Speed" section to the bottom of https://git-scm.com/docs/git-status (aka `Documentation/git-status.txt`) near https://git-scm.com/docs/git-status#_background_refresh

Describe the various combination of config options in more detail and discuss the pros/cons of each, what the defaults are, and how to set them, how to tell what they are currently set to, and so on.

Then have the advice message reference that new section.

We might also reword the large paragraph ("When `-u` option is not...") in the `--untracked-files` argument to reference the new section. It is a little stale and just as awkward.

Just a thought...
Jeff
Previous: Rudy RigotNext: Rudy Rigot
Message 5 of 58 in “fsmonitor: long status advice adapted to the fsmonitor use case”
  1. fsmonitor: long status advice adapted to the fsmonitor use caseRudy Rigot via GitGitGadget, Oct 15, 2022
  2. Rudy RigotOct 15, 2022
  3. Jeff HostetlerOct 17, 2022
  4. Rudy RigotOct 17, 2022
  5. Jeff HostetlerOct 20, 2022
  6. Rudy RigotOct 20, 2022
  7. Jeff HostetlerOct 24, 2022
  8. status: long status advice adapted to recent capabilitiesRudy Rigot via GitGitGadget, Oct 29, 2022
  9. Jeff HostetlerNov 2, 2022
  10. Rudy RigotNov 2, 2022
  11. Taylor BlauNov 2, 2022
  12. Rudy RigotNov 3, 2022
  13. Ævar Arnfjörð BjarmasonNov 4, 2022
  14. Rudy RigotNov 4, 2022
  15. Taylor BlauNov 4, 2022
  16. status: long status advice adapted to recent capabilitiesRudy Rigot via GitGitGadget, Nov 2, 2022
  17. Taylor BlauNov 4, 2022
  18. Derrick StoleeNov 7, 2022
  19. Taylor BlauNov 7, 2022
  20. Jeff HostetlerNov 15, 2022
  21. Derrick StoleeNov 7, 2022
  22. Eric SunshineNov 7, 2022
  23. Rudy RigotNov 7, 2022
  24. status: long status advice adapted to recent capabilitiesRudy Rigot via GitGitGadget, Nov 10, 2022
  25. Eric SunshineNov 10, 2022
  26. Rudy RigotNov 10, 2022
  27. Eric SunshineNov 10, 2022
  28. Rudy RigotNov 10, 2022
  29. status: long status advice adapted to recent capabilitiesRudy Rigot via GitGitGadget, Nov 10, 2022
  30. Jeff HostetlerNov 15, 2022
  31. Rudy RigotNov 15, 2022
  32. Eric SunshineNov 15, 2022
  33. Rudy RigotNov 15, 2022
  34. Eric SunshineNov 15, 2022
  35. Rudy RigotNov 15, 2022
  36. status: long status advice adapted to recent capabilitiesRudy Rigot via GitGitGadget, Nov 15, 2022
  37. Eric SunshineNov 21, 2022
  38. Rudy RigotNov 21, 2022
  39. Eric SunshineNov 21, 2022
  40. Rudy RigotNov 22, 2022
  41. Eric SunshineNov 22, 2022
  42. Eric SunshineNov 22, 2022
  43. Rudy RigotNov 22, 2022
  44. Eric SunshineNov 22, 2022
  45. Eric SunshineNov 22, 2022
  46. Rudy RigotNov 22, 2022
  47. Eric SunshineNov 22, 2022
  48. status: modernize git-status "slow untracked files" adviceRudy Rigot via GitGitGadget, Nov 22, 2022
  49. status: modernize git-status "slow untracked files" adviceRudy Rigot via GitGitGadget, Nov 22, 2022
  50. Junio C HamanoNov 25, 2022
  51. Rudy RigotNov 29, 2022
  52. Rudy RigotNov 30, 2022
  53. status: modernize git-status "slow untracked files" adviceRudy Rigot via GitGitGadget, Nov 30, 2022
  54. Junio C HamanoDec 1, 2022
  55. Rudy RigotDec 1, 2022
  56. Junio C HamanoDec 1, 2022
  57. Rudy RigotDec 1, 2022
  58. Eric SunshineMay 11, 2023

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.