From: Thomas Rast Date: Mon, 20 Jan 2014 21:51:24 GMT Subject: Re: [PATCH/WIP v2 00/14] inotify support Message-ID: <87iotecof7.fsf@thomasrast.ch> In-Reply-To: Duy Nguyen writes: >> I think a clever way to handle this would be to add a new command: >> >> Wait:: >> This command serves synchronization. Git creates a file of its >> choice in $GIT_DIR/watch (say, `.git/watch/wait.`). Then it >> sends "wait ". The watcher MUST block until it has processed >> all change notifications up to and including . > > So wait. inotify event functions as a barrier. Nice. I forgot to specify a return for "wait". Not sure you need one, though correctly handling the timeout (that you apply for all select()) may be somewhat tricky without it. >> Ok, that's probably a confused sum of rambles. Let me know if you can >> make any sense of it. > > Thank you for your input. Now I'm back to the white board (or paper). Don't go too far ;-) Thanks a lot for doing this! It's good that you picked it up, and I think your design strikes a good balance in the complexity of the protocol and the daemon's state. -- Thomas Rast tr@thomasrast.ch