Re: [PATCH 06/16] odb: move kept cache into `struct packfile_store`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Steinhardt <ps@xxxxxx> writes:

> The object database tracks a cache of "kept" packfiles, which is used by
> git-pack-objects(1) to handle cruft objects. With the introduction of
> the `struct packfile_store` we have a better place to host this cache
> though.
>
> Move the cache accordingly.
>
> Signed-off-by: Patrick Steinhardt <ps@xxxxxx>
> ---
>  odb.h      |  9 +--------
>  packfile.c | 16 ++++++++--------
>  packfile.h |  5 +++++
>  3 files changed, 14 insertions(+), 16 deletions(-)
>
> diff --git a/odb.h b/odb.h
> index 2dc3bdc79d..f1736b067c 100644
> --- a/odb.h
> +++ b/odb.h
> @@ -124,17 +124,10 @@ struct object_database {
>  	unsigned commit_graph_attempted : 1; /* if loading has been attempted */
>  
>  	/*
> -	 * private data
> -	 *
> -	 * should only be accessed directly by packfile.c
> +	 * Should only be accessed directly by packfile.c
>  	 */

Hmph, would this be better done in the step [01/16]?  Or did the
removal of kept_pack_cache make the last piece of "private data"
disappear with this step?

>  	struct packfile_store *packfiles;
>  
> -	struct {
> -		struct packed_git **packs;
> -		unsigned flags;
> -	} kept_pack_cache;
> -
>  	/*
>  	 * This is meant to hold a *small* number of objects that you would
>  	 * want odb_read_object() to be able to return, but yet you do not want




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux