From: Elijah Newren Date: Wed, 09 May 2018 17:42:36 GMT Subject: Re: [PATCH] repository: fix free problem with repo_clear(the_repository) Message-ID: In-Reply-To: <20180509170409.13666-1-pclouds@gmail.com> On Wed, May 9, 2018 at 10:04 AM, Nguyễn Thái Ngọc Duy wrote: > the_repository is special. One of the special things about it is that > it does not allocate a new index_state object like submodules but > points to the global the_index variable instead. As a global variable, > the_index cannot be free()'d. > > Add an exception for this in repo_clear(). In the future perhaps we > would be able to allocate the_repository's index on heap too. Then we > can remove revert this. "remove revert"?