From: Brandon Williams Date: Wed, 21 Jun 2017 22:54:03 GMT Subject: Re: [PATCH v3 15/20] repository: add index_state to struct repo Message-ID: <20170621225403.GH53348@google.com> In-Reply-To: <20170621155059.3ae2c601@twelve2.svl.corp.google.com> 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)? Is there a reason to prefer one versus the other? Either way I can change. > > [snip] > > > + /* Repository's in-memory index */ > > + struct index_state *index; > > + > > Might be worth commenting that repo_read_index() can populate this. -- Brandon Williams