Re: [PATCH/WIP v2 03/14] read-cache: connect to file watcher

2014-01-17 Thread Duy Nguyen
On Fri, Jan 17, 2014 at 10:24 PM, Torsten Bögershausen wrote: > On 2014-01-17 10.47, Nguyễn Thái Ngọc Duy wrote: > [snip[ >> diff --git a/file-watcher-lib.c b/file-watcher-lib.c > > >> +int connect_watcher(const char *path) > Could it be worth to check if we can use some code from unix-socket.c ?

Re: [PATCH/WIP v2 03/14] read-cache: connect to file watcher

2014-01-17 Thread Torsten Bögershausen
On 2014-01-17 10.47, Nguyễn Thái Ngọc Duy wrote: [snip[ > diff --git a/file-watcher-lib.c b/file-watcher-lib.c > +int connect_watcher(const char *path) Could it be worth to check if we can use some code from unix-socket.c ? Especially important could be that unix_sockaddr_init() wotks around a p

[PATCH/WIP v2 03/14] read-cache: connect to file watcher

2014-01-17 Thread Nguyễn Thái Ngọc Duy
This patch establishes a connection between a new file watcher daemon and git. Each index file may have at most one file watcher attached to it. The file watcher maintains a UNIX socket at $GIT_DIR/index.watcher. Any process that has write access to $GIT_DIR can talk to the file watcher. A validat