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

Re: [RFC/PATCH] Documentation/technical/api-fswatch.txt: start with outline

From
Karsten Blees <karsten.blees@gmail.com>
Date
Mar 13, 2013, 17:50 UTC
Message-ID
<5140BC80.4000201@gmail.com>
In-Reply-To
<CACsJy8CBru+Z0+oYVKGdwjiF4DDH3w4vCjunaoCnoDQ6AizwWg@mail.gmail.com>
Am 13.03.2013 02:03, schrieb Duy Nguyen:
Show 5 quoted lines
> On Wed, Mar 13, 2013 at 6:21 AM, Karsten Blees <karsten.blees@gmail.com> wrote:
>> Hmmm...I don't see how filesystem changes since last invocation can solve the problem, or am I missing something? I think what you mean to say is that the daemon should keep track of the filesystem *state* of the working copy, or alternatively the deltas/changes to some known state (such as .git/index)?
> 
> I think git process can keep track of filesystem state (and save it
> down if necessary).

[...] Ah, saving the state was the missing bits, thanks.

However, AFAIK inotify doesn't work recursively, so the daemon would at least have to track the directory structure to be able to register / unregister inotify handlers as directories come and go.
Show 8 quoted lines
>> Consider 'git status; make; make clean; git status'...that's a *lot* of changes to process for nothing (potentially slowing down make).
> 
> Yeah. In my opinion, the daemon should realize that at some point
> accumulated changes are too much that it's not worth collecting
> anymore, and drop them all. Git will do it the normal/slow way. After
> that the daemon picks up again. We only optimize for the case when
> little changes are made in filesystem.
> 
That sounds reasonable...
Show 8 quoted lines
>> Then there's the issue of stale data in the cache. Modifying porcelain commands that use 'git status --porcelain' to compile their changesets will want 100% exact data. I'm not saying its not doable, but adding another platform specific, caching daemon to the tool chain doesn't exactly simplify things...
>>
>> But perhaps I'm too pessimistic (or just stigmatized by inherently slow and out-of-date TGitCache/TSvnCache on Windows :-)
> 
> Thanks. I didn't know about TGitCache. Will dig it up. Maybe we can
> learn something from it (or realize the daemon approach is futile
> after all).
> 
TGitCache/TSvnCache are the background processes in TortoiseGit/TortoiseSvn that keep track of filesystem state to display icon overlays in Windows Explorer.
Previous: Duy NguyenNext: Junio C Hamano
Message 8 of 17 in “Documentation/technical/api-fswatch.txt: start with outline”
  1. Documentation/technical/api-fswatch.txt: start with outlineRamkumar Ramachandra, Mar 10, 2013
  2. Heiko VoigtMar 11, 2013
  3. Ramkumar RamachandraMar 12, 2013
  4. Erik Faye-LundMar 12, 2013
  5. Jeff KingMar 12, 2013
  6. Karsten BleesMar 12, 2013
  7. Duy NguyenMar 13, 2013
  8. Karsten BleesMar 13, 2013
  9. Junio C HamanoMar 13, 2013
  10. Duy NguyenMar 14, 2013
  11. Pete WyckoffMar 15, 2013
  12. Thomas RastMar 16, 2013
  13. Ramkumar RamachandraMar 18, 2013
  14. Thomas RastMar 18, 2013
  15. Ramkumar RamachandraMar 25, 2013
  16. Duy NguyenMar 25, 2013
  17. Ramkumar RamachandraMar 25, 2013

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.