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

Detecting when bulk file-system operations complete

From
DNDrew Noakes <drew@drewnoakes.com>
Date
Mar 31, 2021, 03:39 UTC
Message-ID
<CAJd66x6XT7m5Njg2kRyGJ80rU6WNcLifijS98=onJeBz+74rrA@mail.gmail.com>
Hi,
I develop IDE tooling that watches a repo's workspace and reacts to changes.

Bulk file-system changes (i.e. branch switch, rebase, merge, cherry-pick) trigger lots of file system events, and my tooling should ignore intermediary updates. Currently I debounce events with a fixed time span, but would like a more reliable and performant approach to scheduling this reactive work.

Can this be done by monitoring the GITDIR in some way? For example, is there a file that's present when these operations are in flight, and which is removed when they complete?

If an operation is interrupted (i.e. merge or rebase that hits a conflict) my tooling should consider the bulk operation as complete. This means that detecting a git-rebase-todo file or rebase-merge/rebase-apply folder is not adequate.

Any help appreciated. Thanks!
Drew.
Next: Philip Oakley
Message 1 of 4 in “Detecting when bulk file-system operations complete”
  1. Drew NoakesMar 31, 2021
  2. Philip OakleyMar 31, 2021
  3. Derrick StoleeApr 1, 2021
  4. Jeff HostetlerApr 2, 2021

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.