{"thread":{"id":"35748","subject":"inotify support, nearly there","startedAt":"2014-01-29T06:47:30Z","lastAt":"2014-07-22T23:27:34Z","messageCount":6,"participants":["Duy Nguyen","Mike Hommey","Juan P","Ronnie Sahlberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"233879","messageId":"CACsJy8CG5QUqYOM46mOHOWDKB-A45B2-fj1uS9OtgniV+P8Ktg@mail.gmail.com","threadId":"35748","inReplyTo":null,"subject":"inotify support, nearly there","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-01-29T06:47:30Z","receivedAt":"2014-01-29T06:47:30Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Just a quick update for the enthusiasts. My branch file-watcher [1]\nhas got working per-user inotify support. It's a 20 patch series so\nI'll refrain from spamming git@vger for a while, even though it hurts\nyour eyes a lot less than what I have posted so far. The test suite\nran fine with it so it's not that buggy. It has new tests too, even\nthough real inotify is not tested in the new tests. Documentation is\nthere, either in .txt or comments. Using it is simple:\n\n$ mkdir ~/.watcher\n$ git file-watcher --detach ~/.watcher\n$ git config --global filewatcher.path $HOME/.watcher\n\nThere's still some polishing work to do. But I think the core logic is\ndone. I have some ideas what to be polished, but I'd appreciate\nfeedback if anyone uses it. We may need to make lookup code faster\nlater.\n\nMacOS, FreeBSD and Windows contributors. If you have time and are\ninterested, have a look at the protocol, which is basically documented\nin file-watcher.c:handle_command(), and see if something is\nincompatible with your file notification mechanism. MacOS and FreeBSD\nmay reuse code from file-watcher.c, at least the unix socket part. I'm\nnot so sure about Windows. It probably needs a brand new daemon\nbecause little could be shared, I don't know. I deliberately design\nthe daemon dumb so writing a completely new one won't be so hard. My\nplan is focus on inotify and get it merged first, then new OS support\ncan come later (with refactoring if needed, but should not change the\nprotocol drastically).\n\n[1] git clone https://github.com/pclouds/git.git file-watcher\n--\nDuy\n"},{"id":"233880","messageId":"20140129074435.GA21044@glandium.org","threadId":"35748","inReplyTo":"CACsJy8CG5QUqYOM46mOHOWDKB-A45B2-fj1uS9OtgniV+P8Ktg@mail.gmail.com","subject":"Re: inotify support, nearly there","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2014-01-29T07:44:35Z","receivedAt":"2014-01-29T07:44:35Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Wed, Jan 29, 2014 at 01:47:30PM +0700, Duy Nguyen wrote:\n> Just a quick update for the enthusiasts. My branch file-watcher [1]\n> has got working per-user inotify support. It's a 20 patch series so\n> I'll refrain from spamming git@vger for a while, even though it hurts\n> your eyes a lot less than what I have posted so far. The test suite\n> ran fine with it so it's not that buggy. It has new tests too, even\n> though real inotify is not tested in the new tests. Documentation is\n> there, either in .txt or comments. Using it is simple:\n> \n> $ mkdir ~/.watcher\n> $ git file-watcher --detach ~/.watcher\n> $ git config --global filewatcher.path $HOME/.watcher\n> \n> There's still some polishing work to do. But I think the core logic is\n> done. I have some ideas what to be polished, but I'd appreciate\n> feedback if anyone uses it. We may need to make lookup code faster\n> later.\n> \n> MacOS, FreeBSD and Windows contributors. If you have time and are\n> interested, have a look at the protocol, which is basically documented\n> in file-watcher.c:handle_command(), and see if something is\n> incompatible with your file notification mechanism. MacOS and FreeBSD\n> may reuse code from file-watcher.c, at least the unix socket part. I'm\n> not so sure about Windows. It probably needs a brand new daemon\n> because little could be shared, I don't know. I deliberately design\n> the daemon dumb so writing a completely new one won't be so hard. My\n> plan is focus on inotify and get it merged first, then new OS support\n> can come later (with refactoring if needed, but should not change the\n> protocol drastically).\n> \n> [1] git clone https://github.com/pclouds/git.git file-watcher\n\nHaven't looked at the code, so I don't know if you've done that, but in\ncase you haven't, it would be nice to have an environment variable or a\nconfig option to make git use the file-watcher *and* normal lstat\noperations, to check consistency.\n\nMike\n"},{"id":"233881","messageId":"CACsJy8Bi-dFbWKOGw4C3fUXZ2p_0mc5CjhyMkL9p_F0H4V1rOg@mail.gmail.com","threadId":"35748","inReplyTo":"20140129074435.GA21044@glandium.org","subject":"Re: inotify support, nearly there","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-01-29T08:33:24Z","receivedAt":"2014-01-29T08:33:24Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Jan 29, 2014 at 2:44 PM, Mike Hommey <mh@glandium.org> wrote:\n> Haven't looked at the code, so I don't know if you've done that, but in\n> case you haven't, it would be nice to have an environment variable or a\n> config option to make git use the file-watcher *and* normal lstat\n> operations, to check consistency.\n\nNo I haven't. So far I depend on my manual tests and the test suite to\ncheck for consistency. Will do.\n-- \nDuy\n"},{"id":"246431","messageId":"loom.20140721T070730-175@post.gmane.org","threadId":"35748","inReplyTo":"CACsJy8CG5QUqYOM46mOHOWDKB-A45B2-fj1uS9OtgniV+P8Ktg@mail.gmail.com","subject":"Re: inotify support, nearly there","fromName":"Juan P","fromEmail":"juandavid1707@gmail.com","sentAt":"2014-07-21T05:10:53Z","receivedAt":"2014-07-21T05:10:53Z","isPatch":false,"sender":{"key":"juandavid1707@gmail.com","avatar":null},"body":"Duy Nguyen <pclouds <at> gmail.com> writes:\n\n> \n> Just a quick update for the enthusiasts. My branch file-watcher [1]\n> has got working per-user inotify support. It's a 20 patch series so\n> I'll refrain from spamming git <at> vger for a while, even though it hurts\n> your eyes a lot less than what I have posted so far. The test suite\n> ran fine with it so it's not that buggy. It has new tests too, even\n> though real inotify is not tested in the new tests. Documentation is\n> there, either in .txt or comments. Using it is simple:\n> \n> $ mkdir ~/.watcher\n> $ git file-watcher --detach ~/.watcher\n> $ git config --global filewatcher.path $HOME/.watcher\n> \n\nWill this mean that Git would work faster with repositories with large \nnumber of files or commits? I am new into this topic, but I am trying to \nunderstand, any pointers are appreciated.\n"},{"id":"246503","messageId":"CAL=YDWk90x0XBjj7rkSaeTZ-pwSj=vktvOYbyivpqqwJVAGMRw@mail.gmail.com","threadId":"35748","inReplyTo":"loom.20140721T070730-175@post.gmane.org","subject":"Re: inotify support, nearly there","fromName":"Ronnie Sahlberg","fromEmail":"sahlberg@google.com","sentAt":"2014-07-22T16:39:37Z","receivedAt":"2014-07-22T16:39:37Z","isPatch":false,"sender":{"key":"sahlberg@google.com","avatar":"https://avatars.githubusercontent.com/u/7320636?v=4"},"body":"On Sun, Jul 20, 2014 at 10:10 PM, Juan P <juandavid1707@gmail.com> wrote:\n> Duy Nguyen <pclouds <at> gmail.com> writes:\n>\n>>\n>> Just a quick update for the enthusiasts. My branch file-watcher [1]\n>> has got working per-user inotify support. It's a 20 patch series so\n>> I'll refrain from spamming git <at> vger for a while, even though it hurts\n>> your eyes a lot less than what I have posted so far. The test suite\n>> ran fine with it so it's not that buggy. It has new tests too, even\n>> though real inotify is not tested in the new tests. Documentation is\n>> there, either in .txt or comments. Using it is simple:\n>>\n>> $ mkdir ~/.watcher\n>> $ git file-watcher --detach ~/.watcher\n>> $ git config --global filewatcher.path $HOME/.watcher\n>>\n>\n> Will this mean that Git would work faster with repositories with large\n> number of files or commits? I am new into this topic, but I am trying to\n> understand, any pointers are appreciated.\n>\n\nThat is the idea. Instead of having to recursively lstat() every file\nto find which ones have changed this will allow to query a database\nfor \"tell me all files that match this criteria xyz\" which could speed\nup many things.\n\nDuy, keep up the good work.\nOnce you are ready I am more than happy to help out reviewing the patches.\n\nregards\nronnie sahlberg\n"},{"id":"246533","messageId":"CACsJy8B=XLPOj0YNwdmmFtOaVBXDR1UN+k-vz9M+nRsTGUHHxA@mail.gmail.com","threadId":"35748","inReplyTo":"CAL=YDWk90x0XBjj7rkSaeTZ-pwSj=vktvOYbyivpqqwJVAGMRw@mail.gmail.com","subject":"Re: inotify support, nearly there","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-07-22T23:27:34Z","receivedAt":"2014-07-22T23:27:34Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Jul 22, 2014 at 11:39 PM, Ronnie Sahlberg <sahlberg@google.com> wrote:\n> Duy, keep up the good work.\n> Once you are ready I am more than happy to help out reviewing the patches.\n\nThe road I'm taking is:\n\n1) split-index to speed up index writing time\n2) add index-helper daemon to speed up index reading time\n3) speed up .gitignore processing by caching the results and validate\nusing directory stat info\n4) make sure 3) works (e.g. index extension data..) with another\nsource than directory stat info, like inotify\n5) finally put inotify in place to kill lstat in index refresh and .gitignore\n\n1) is entering next (or master) now. I need to submit 2) again and get\nWindows guys' opinion (up to 3 it should work on Windows). As you can\nsee it'll like take a lot more months to get to 5). I feel a bit\nguilty of \"blocking\" David Turner's inotify support series, which does\nnot require so many changes like this (but only benefits *nix),\nbecause I _think_ this road is better. If you have time, maybe you can\nhave a look at his series and push it forward?\n-- \nDuy\n"}]}