Re: [PATCH 1/5] read-cache: add watchman 'WAMA' extension

2015-11-03 Thread David Turner
On Tue, 2015-11-03 at 20:17 +0100, Duy Nguyen wrote: > On Mon, Nov 2, 2015 at 11:03 PM, David Turner > wrote: > > On Sun, 2015-11-01 at 14:55 +0100, Nguyễn Thái Ngọc Duy wrote: > >> > >>+#define CE_NO_WATCH (0x0001) > > > > This name seems very confusing to me. CE_NO_WATCHMAN_STAT? > > CE_UNKNO

Re: [PATCH 1/5] read-cache: add watchman 'WAMA' extension

2015-11-03 Thread Duy Nguyen
On Mon, Nov 2, 2015 at 11:03 PM, David Turner wrote: > On Sun, 2015-11-01 at 14:55 +0100, Nguyễn Thái Ngọc Duy wrote: >> >>+#define CE_NO_WATCH (0x0001) > > This name seems very confusing to me. CE_NO_WATCHMAN_STAT? > CE_UNKNOWN_TO_WATCHMAN? Files that are known updated. Maybe CE_WATCHMAN_DIRTY

Re: [PATCH 1/5] read-cache: add watchman 'WAMA' extension

2015-11-02 Thread David Turner
On Sun, 2015-11-01 at 14:55 +0100, Nguyễn Thái Ngọc Duy wrote: > >+#define CE_NO_WATCH (0x0001) This name seems very confusing to me. CE_NO_WATCHMAN_STAT? CE_UNKNOWN_TO_WATCHMAN? (one reason it may seem more confusing to me than to others is that Twitter's code has a concept of files that we

[PATCH 1/5] read-cache: add watchman 'WAMA' extension

2015-11-01 Thread Nguyễn Thái Ngọc Duy
The extension contains a bitmap, one bit for each entry in the index. If the n-th bit is zero, the n-th entry is considered unchanged, we can ce_mark_uptodate() it without refreshing. If the bit is non-zero and we found out the corresponding file is clean after refresh, we can clear the bit. The '