Re: [PATCH v3 15/20] repository: add index_state to struct repo

2017-06-21 Thread Stefan Beller
On Wed, Jun 21, 2017 at 3:54 PM, Brandon Williams wrote: > On 06/21, Jonathan Tan wrote: >> On Tue, 20 Jun 2017 12:19:46 -0700 >> Brandon Williams wrote: >> >> > +int repo_read_index(struct repository *repo) >> > +{ >> > + if (!repo->index) >> > +

Re: [PATCH v3 15/20] repository: add index_state to struct repo

2017-06-21 Thread Brandon Williams
On 06/21, Jonathan Tan wrote: > On Tue, 20 Jun 2017 12:19:46 -0700 > Brandon Williams wrote: > > > +int repo_read_index(struct repository *repo) > > +{ > > + if (!repo->index) > > + repo->index = xcalloc(1, sizeof(struct index_state)); > > sizeof(*repo->index)?

Re: [PATCH v3 15/20] repository: add index_state to struct repo

2017-06-21 Thread Jonathan Tan
On Tue, 20 Jun 2017 12:19:46 -0700 Brandon Williams wrote: > +int repo_read_index(struct repository *repo) > +{ > + if (!repo->index) > + repo->index = xcalloc(1, sizeof(struct index_state)); sizeof(*repo->index)? [snip] > + /* Repository's in-memory

[PATCH v3 15/20] repository: add index_state to struct repo

2017-06-20 Thread Brandon Williams
Signed-off-by: Brandon Williams --- repository.c | 16 repository.h | 6 ++ 2 files changed, 22 insertions(+) diff --git a/repository.c b/repository.c index 3dcfec3b8..883e6e9e9 100644 --- a/repository.c +++ b/repository.c @@ -175,5 +175,21 @@ void