Re: [PATCH 046/194] object-store: move replace_objects back to object-store
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 9, 2018, 23:15 UTC
- Message-ID
- <xmqqzi4hu53x.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180205235735.216710-26-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 23 quoted lines
> @@ -32,7 +31,15 @@ struct object_store {
> * Objects that should be substituted by other objects
> * (see git-replace(1)).
> */
> - struct replace_objects replacements;
> + struct replace_objects {
> + /*
> + * An array of replacements. The array is kept sorted by the original
> + * sha1.
> + */
> + struct replace_object **items;
> +
> + int alloc, nr;
> + } replacements;
>
> /*
> * A fast, rough count of the number of objects in the repository.
> @@ -49,7 +56,7 @@ struct object_store {
> unsigned packed_git_initialized : 1;
> };
> #define OBJECT_STORE_INIT \
> - { NULL, MRU_INIT, ALTERNATES_INIT, REPLACE_OBJECTS_INIT, 0, 0, 0 }
> + { NULL, MRU_INIT, ALTERNATES_INIT, { NULL, 0, 0 }, 0, 0, 0 }Not the primary thrust of this topic, but we may want to convert these to use designated initializers after this series is done.