Re: [PATCH 28/35] commit.c: migrate the commit buffer to the parsed object store
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jun 6, 2018, 19:31 UTC
- Message-ID
- <CACsJy8BQGqNDkoL0ykNdbgAx75MjPzW3Ki5+rbHxxJ8TNWDZcw@mail.gmail.com>
- In-Reply-To
- <20180530004810.30076-29-sbeller@google.com>
On Wed, May 30, 2018 at 2:48 AM, Stefan Beller <sbeller@google.com> wrote:
Show 16 quoted lines
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> commit.c | 29 +++++++++++++++++++++++------
> commit.h | 2 ++
> object.c | 5 +++++
> object.h | 2 ++
> 4 files changed, 32 insertions(+), 6 deletions(-)
>
> diff --git a/commit.c b/commit.c
> index fd31c453fdc..45dbf6f1453 100644
> --- a/commit.c
> +++ b/commit.c
> @@ -248,18 +248,32 @@ struct commit_buffer {
> unsigned long size;
> };
> define_commit_slab(buffer_slab, struct commit_buffer);struct buffer_slab is defined locally here...
Show 9 quoted lines
> diff --git a/commit.h b/commit.h > index 536fa03955f..df199498bfb 100644 > --- a/commit.h > +++ b/commit.h > @@ -81,6 +81,8 @@ static inline int parse_commit_the_repository(struct commit *item) > } > void parse_commit_or_die(struct commit *item); > > +struct buffer_slab *allocate_commit_buffer_slab(void);
So you would need a forward declaration of struct buffer_slab in commit.h before it's referenced here?
Show 10 quoted lines
> diff --git a/object.h b/object.h
> index 6adc8323ca4..45e22282101 100644
> --- a/object.h
> +++ b/object.h
> @@ -22,6 +22,8 @@ struct parsed_object_pool {
> char *alternate_shallow_file;
>
> int commit_graft_prepared;
> +
> + struct buffer_slab *buffer_slab;and maybe here as well
Show 6 quoted lines
> }; > > struct parsed_object_pool *parsed_object_pool_new(void); > -- > 2.17.0.582.gccdcbd54c44.dirty >
-- Duy