Subject: Re: [PATCH/WIP v2 00/14] inotify support

From: Thomas Rast <[email-masked]>
Date: Mon, 20 Jan 2014 22:51:24 +0100

Duy Nguyen <[email-masked]> 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.<random>`).  Then it
>>     sends "wait <path>".  The watcher MUST block until it has processed
>>     all change notifications up to and including <path>.
>
> So wait.<random> 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
[email-masked]