Re: [PATCH v10 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-13 Thread David Turner
On Fri, 2016-05-13 at 00:10 +0100, Ramsay Jones wrote: > > On 12/05/16 21:20, David Turner wrote: > > From: Nguyễn Thái Ngọc Duy > [snip] > > > > > +/* in ms */ > > +#define WATCHMAN_TIMEOUT 1000 > > + > > +static int poke_and_wait_for_reply(int fd) > > +{ > > + struct

Re: [PATCH v10 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-12 Thread Ramsay Jones
On 12/05/16 21:20, David Turner wrote: > From: Nguyễn Thái Ngọc Duy [snip] > > +/* in ms */ > +#define WATCHMAN_TIMEOUT 1000 > + > +static int poke_and_wait_for_reply(int fd) > +{ > + struct strbuf buf = STRBUF_INIT; > + int ret = -1; > + struct pollfd pollfd;

[PATCH v10 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-12 Thread David Turner
From: Nguyễn Thái Ngọc Duy Watchman is hidden behind index-helper. Before git tries to read the index from shm, it notifies index-helper through the socket and waits for index-helper to prepare a file for sharing memory (with MAP_SHARED). index-helper then contacts watchman,