Re: [PATCH v7 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 20, 2017, 06:23 UTC
- Message-ID
- <xmqq377hopma.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170919192744.19224-5-benpeart@microsoft.com>
Ben Peart <benpeart@microsoft.com> writes:
Show 5 quoted lines
> @@ -344,6 +346,7 @@ struct index_state {
> struct hashmap dir_hash;
> unsigned char sha1[20];
> struct untracked_cache *untracked;
> + uint64_t fsmonitor_last_update;This field being zero has more significance than just "we haven't got any update yet", right? The way I am reading the code is that setting it 0 is a way to signal that fsmon has been inactivated. It also made me wonder if add_fsmonitor() that silently returns without doing anything when this field is already non-zero is a bug (in other words, I couldn't tell what the right answer would be to a question "shouldn't the caller be avoiding duplicate calls?").
Show 6 quoted lines
> diff --git a/fsmonitor.c b/fsmonitor.c > new file mode 100644 > index 0000000000..b8b2d88fe1 > --- /dev/null > +++ b/fsmonitor.c > ...
This part was a pleasant read.
Thanks.