Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-25 Thread Alex Vandiver
On Fri, 20 Oct 2017, Johannes Schindelin wrote: > From the diff, it is not immediately clear that fsmonitor_dirty is not > leaked in any code path. > > Could you clarify this in the commit message, please? Will do! > > @@ -238,6 +225,29 @@ void remove_fsmonitor(struct index_state *istate) > >

Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-23 Thread Ben Peart
On 10/23/2017 5:57 AM, Johannes Schindelin wrote: Hi Peff, On Fri, 20 Oct 2017, Jeff King wrote: On Fri, Oct 20, 2017 at 03:16:20PM +0200, Johannes Schindelin wrote: void tweak_fsmonitor(struct index_state *istate) { + int i; + + if (istate->fsmonitor_dirty) { +

Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-23 Thread Johannes Schindelin
Hi Peff, On Fri, 20 Oct 2017, Jeff King wrote: > On Fri, Oct 20, 2017 at 03:16:20PM +0200, Johannes Schindelin wrote: > > > > void tweak_fsmonitor(struct index_state *istate) > > > { > > > + int i; > > > + > > > + if (istate->fsmonitor_dirty) { > > > + /* Mark all entries valid */ > >

Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-20 Thread Jeff King
On Fri, Oct 20, 2017 at 03:16:20PM +0200, Johannes Schindelin wrote: > > void tweak_fsmonitor(struct index_state *istate) > > { > > + int i; > > + > > + if (istate->fsmonitor_dirty) { > > + /* Mark all entries valid */ > > + trace_printf_key(_fsmonitor, "fsmonitor is

Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-20 Thread Junio C Hamano
Ben Peart writes: >>> + } else { >>> + trace_printf_key(_fsmonitor, "fsmonitor not enabled"); >>> + } >>> + > > I'd remove the trace statement above as it isn't always > accurate. fsmonitor could be enabled but just hasn't written/read the > extension yet. I

Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-20 Thread Ben Peart
On 10/20/2017 9:16 AM, Johannes Schindelin wrote: Hi Alex, On Thu, 19 Oct 2017, Alex Vandiver wrote: extern struct index_state the_index; diff --git a/fsmonitor.c b/fsmonitor.c index 7c1540c05..4c2668f57 100644 --- a/fsmonitor.c +++ b/fsmonitor.c @@ -49,20 +49,7 @@ int

Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-20 Thread Johannes Schindelin
Hi Alex, On Thu, 19 Oct 2017, Alex Vandiver wrote: > extern struct index_state the_index; > diff --git a/fsmonitor.c b/fsmonitor.c > index 7c1540c05..4c2668f57 100644 > --- a/fsmonitor.c > +++ b/fsmonitor.c > @@ -49,20 +49,7 @@ int read_fsmonitor_extension(struct index_state *istate, > const

[PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-19 Thread Alex Vandiver
If the fsmonitor extension is used in conjunction with the split index extension, the set of entries in the index when it is first loaded is only a subset of the real index. This leads to only the non-"base" index being marked as CE_FSMONITOR_VALID. Delay the expansion of the ewah bitmap until