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
Rudy Rigot <rudy.rigot@gmail.com>
Date
Oct 17, 2022, 16:59 UTC
Message-ID
<CANaDLWKcF07=FQgT7ZTKmcgworH45YdNy8hy2faMBg3CGYEf+w@mail.gmail.com>
In-Reply-To
<087d3fca-d01e-f36a-85f5-7e861e4d11ca@jeffhostetler.com>
> 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. 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')."

I intentionally phrased it all in a way that manages expectations, "may be faster", since you said the state of the FSM token could be impacted by a variety of things, so we can't exactly commit to anything for sure about the next call.

Let me know what you think, I definitely want to do this right.
> WRT testing

Oh, I didn't realize I could do this! Alright, I need time to look into it. With that, it means I can test the existing advice message use case, which I don't believe is currently tested, so I'm double-glad!

Thanks a lot for all the insight.
Previous: Jeff HostetlerNext: Jeff Hostetler
Message 4 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.