Stefan Beller <[email protected]> writes:
> @@ @@
> - packed_git_mru
> + the_repository->objects.packed_git_mru
Regarding this...
> diff --git a/object-store.h b/object-store.h
> index a3f0d6ac15..024ccc91e9 100644
> --- a/object-store.h
> +++ b/object-store.h
> @@ -2,6 +2,7 @@
> #define OBJECT_STORE_H
>
> #include "cache.h"
> +#include "list.h"
>
> struct raw_object_store {
> ...
> + struct packed_git *packed_git;
> + /*
> + * A most-recently-used ordered version of the packed_git list, which
> can
> + * be iterated instead of packed_git (and marked via mru_mark).
> + */
> + struct list_head packed_git_mru;
> +
> struct alternate_object_database *alt_odb_list;
> struct alternate_object_database **alt_odb_tail;
>
> unsigned ignore_env : 1;
> };
> -#define RAW_OBJECT_STORE_INIT { NULL, NULL, NULL, 0 }
> +
> +#define MRU_LIST_INIT {NULL, NULL}
> +#define RAW_OBJECT_STORE_INIT { NULL, NULL, MRU_LIST_INIT, NULL, NULL, 0 }
> ...
> diff --git a/packfile.c b/packfile.c
> index 216ea836ee..d41e4c83d0 100644
> --- a/packfile.c
> +++ b/packfile.c
> @@ -7,6 +7,7 @@
> -...
> -LIST_HEAD(packed_git_mru);
Given that the definition of LIST_HEAD() is
/* Define a variable with the head and tail of the list. */
#define LIST_HEAD(name) \
struct list_head name = { &(name), &(name) }
doesn't the updated definition of RAW_OBJECT_STORE_INIT look fishy?