Re: [PATCH 059/194] refs: store the main ref store inside the repository struct
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 6, 2018, 04:27 UTC
- Message-ID
- <CAPig+cTnucxCf5=24UBKGU5q_n0mwn0eB1pCLdiA77qXn-1n7Q@mail.gmail.com>
- In-Reply-To
- <20180205235735.216710-39-sbeller@google.com>
On Mon, Feb 5, 2018 at 6:55 PM, Stefan Beller <sbeller@google.com> wrote:
Show 13 quoted lines
> diff --git a/refs.c b/refs.c
> @@ -1609,9 +1609,6 @@ static struct ref_store_hash_entry *alloc_ref_store_hash_entry(
> -/* A pointer to the ref_store for the main repository: */
> -static struct ref_store *main_ref_store;
> diff --git a/repository.h b/repository.h
> @@ -33,6 +33,11 @@ struct repository {
> */
> struct object_store objects;
>
> + /*
> + * The store in which the refs are hold.
> + */
> + struct ref_store *main_ref_store;Do items moved to the 'repository' structure need to be freed when the 'repository' itself is freed? Is that being done by a different patch? If so, it would ease review burden for the freeing to happen in the same patch in which the item is moved to the 'repository'.