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

Re: inotify support, nearly there

From
Mike Hommey <mh@glandium.org>
Date
Jan 29, 2014, 07:44 UTC
Message-ID
<20140129074435.GA21044@glandium.org>
In-Reply-To
<CACsJy8CG5QUqYOM46mOHOWDKB-A45B2-fj1uS9OtgniV+P8Ktg@mail.gmail.com>
On Wed, Jan 29, 2014 at 01:47:30PM +0700, Duy Nguyen wrote:
Show 30 quoted lines
> Just a quick update for the enthusiasts. My branch file-watcher [1]
> has got working per-user inotify support. It's a 20 patch series so
> I'll refrain from spamming git@vger for a while, even though it hurts
> your eyes a lot less than what I have posted so far. The test suite
> ran fine with it so it's not that buggy. It has new tests too, even
> though real inotify is not tested in the new tests. Documentation is
> there, either in .txt or comments. Using it is simple:
> 
> $ mkdir ~/.watcher
> $ git file-watcher --detach ~/.watcher
> $ git config --global filewatcher.path $HOME/.watcher
> 
> There's still some polishing work to do. But I think the core logic is
> done. I have some ideas what to be polished, but I'd appreciate
> feedback if anyone uses it. We may need to make lookup code faster
> later.
> 
> MacOS, FreeBSD and Windows contributors. If you have time and are
> interested, have a look at the protocol, which is basically documented
> in file-watcher.c:handle_command(), and see if something is
> incompatible with your file notification mechanism. MacOS and FreeBSD
> may reuse code from file-watcher.c, at least the unix socket part. I'm
> not so sure about Windows. It probably needs a brand new daemon
> because little could be shared, I don't know. I deliberately design
> the daemon dumb so writing a completely new one won't be so hard. My
> plan is focus on inotify and get it merged first, then new OS support
> can come later (with refactoring if needed, but should not change the
> protocol drastically).
> 
> [1] git clone https://github.com/pclouds/git.git file-watcher

Haven't looked at the code, so I don't know if you've done that, but in case you haven't, it would be nice to have an environment variable or a config option to make git use the file-watcher *and* normal lstat operations, to check consistency.

Mike
Previous: Duy NguyenNext: Duy Nguyen
Message 2 of 6 in “inotify support, nearly there”
  1. Duy NguyenJan 29, 2014
  2. Mike HommeyJan 29, 2014
  3. Duy NguyenJan 29, 2014
  4. Juan PJul 21, 2014
  5. Ronnie SahlbergJul 22, 2014
  6. Duy NguyenJul 22, 2014

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.