Duy Nguyen <pclo...@gmail.com> 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
t...@thomasrast.ch
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to