Re: [PATCH v3 1/5] repo-settings: consolidate some config settings
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 30, 2019, 20:47 UTC
- Message-ID
- <xmqqlfwfs10c.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <4d0db57ecb4d241b61ba1f9c6f23aedc6b9bb4d9.1564515324.git.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> diff --git a/repository.h b/repository.h > index 4fb6a5885f..2bb2bc3eea 100644 > --- a/repository.h > +++ b/repository.h > @@ -4,6 +4,7 @@ > #include "path.h" > > struct config_set; > +struct repo_settings;
Given that the next hunk you introduce the real thing, and nobody refers to it until then, I do not see why we want to have a forward declaration.
Show 37 quoted lines
> struct git_hash_algo;
> struct index_state;
> struct lock_file;
> @@ -11,6 +12,17 @@ struct pathspec;
> struct raw_object_store;
> struct submodule_cache;
>
> +struct repo_settings {
> + int initialized;
> +
> + int core_commit_graph;
> + int gc_write_commit_graph;
> +
> + int index_version;
> +
> + int pack_use_sparse;
> +};
> +
> struct repository {
> /* Environment */
> /*
> @@ -72,6 +84,8 @@ struct repository {
> */
> char *submodule_prefix;
>
> + struct repo_settings settings;
> +
> /* Subsystems */
> /*
> * Repository's config which contains key-value pairs from the usual
> @@ -157,5 +171,6 @@ int repo_read_index_unmerged(struct repository *);
> */
> void repo_update_index_if_able(struct repository *, struct lock_file *);
>
> +void prepare_repo_settings(struct repository *r);
>
> #endif /* REPOSITORY_H */