Re: [PATCH 1/3] repo_read_index: don't discard the index
- From
- Brandon Williams <bmwill@google.com>
- Date
- Jul 12, 2017, 17:27 UTC
- Message-ID
- <20170712172744.GB65927@google.com>
- In-Reply-To
- <20170711235116.GB93855@aiede.mtv.corp.google.com>
On 07/11, Jonathan Nieder wrote:
Show 12 quoted lines
> Brandon Williams wrote: > > > Have 'repo_read_index()' behave more like the other read_index family of > > functions and don't discard the index if it has already been populated. > > > > Signed-off-by: Brandon Williams <bmwill@google.com> > > --- > > repository.c | 2 -- > > 1 file changed, 2 deletions(-) > > How did you discover this? E.g. was it from code inspection or does > this make the function more convenient to use for some kinds of callers?
When working on another series I realized that some code paths may end up calling read_index() a bunch and I want to prevent discarding and then re-reading the same index over and over again if/when those calls are migrated to using repo_read_index.
> > Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
-- Brandon Williams