Re: [PATCH 09/16] packfile: split up responsibilities of `reprepare_packed_git()`

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

> In `reprepare_packed_git()` we perform a couple of operations:
>
>   - We reload alternate object directories.
>
>   - We clear the loose object cache.
>
>   - We reprepare packfiles.
>
> While the logic is hosted in "packfile.c", it clearly reaches into other
> subsystems that aren't related to packfiles.
>
> Split up the responsibility and introduce `odb_reprepare()` which now
> becomes responsible for repreparing the whole object database. The
> existing `reprepare_packed_git()` function is refactored accordingly and
> only cares about reloading the packfile store now.

[snip]

> diff --git a/odb.h b/odb.h
> index f1736b067c..9810ec60a0 100644
> --- a/odb.h
> +++ b/odb.h
> @@ -155,6 +155,12 @@ struct object_database {
>  struct object_database *odb_new(struct repository *repo);
>  void odb_clear(struct object_database *o);
>
> +/*
> + * Clear caches, reload alternates and then reload object sources so that new
> + * objects may become accessible.
> + */
> +void odb_reprepare(struct object_database *o);
>

I was first wondering why you don't go into details like mentioning the
packile cleanup. But since we eventually will move it into its own
object source, this reads better.

Attachment: signature.asc
Description: PGP signature


[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