Re: [PATCH v3 15/20] repository: add index_state to struct repo
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Jun 21, 2017, 22:50 UTC
- Message-ID
- <20170621155059.3ae2c601@twelve2.svl.corp.google.com>
- In-Reply-To
- <20170620191951.84791-16-bmwill@google.com>
On Tue, 20 Jun 2017 12:19:46 -0700 Brandon Williams <bmwill@google.com> 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 index */ > + struct index_state *index; > +
Might be worth commenting that repo_read_index() can populate this.