Hi Stolee,
On Wed, 24 Jul 2019, Derrick Stolee via GitGitGadget wrote:
> diff --git a/repo-settings.h b/repo-settings.h
> new file mode 100644
> index 0000000000..89fb0159bf
> --- /dev/null
> +++ b/repo-settings.h
> @@ -0,0 +1,17 @@
> +#ifndef REPO_SETTINGS_H
> +#define REPO_SETTINGS_H
> +
> +struct repo_settings {
> + int core_commit_graph;
> + int gc_write_commit_graph;
> +
> + int index_version;
> +
> + int pack_use_sparse;
> +};
> +
> +struct repository;
> +
> +void prepare_repo_settings(struct repository *r);
> +
> +#endif /* REPO_SETTINGS_H */
> diff --git a/repository.h b/repository.h
> index 4fb6a5885f..a817486825 100644
> --- a/repository.h
> +++ b/repository.h
> @@ -2,8 +2,10 @@
> #define REPOSITORY_H
>
> #include "path.h"
> +#include "repo-settings.h"
I still think that the `repo_settings` struct could just as easily be
declared in `repository.h`. No need to invent a new header file.
>
> struct config_set;
> +struct repo_settings;
In any case, this is no longer necessary.
> struct git_hash_algo;
> struct index_state;
> struct lock_file;
> @@ -72,6 +74,9 @@ struct repository {
> */
> char *submodule_prefix;
>
> + int settings_initialized;
Or maybe
unsigned settings_initialized:1;
?
> + struct repo_settings settings;
> +
Or maybe even fold the `initialized` flag into that struct?
Thanks,
Dscho
> /* Subsystems */
> /*
> * Repository's config which contains key-value pairs from the usual
> --
> gitgitgadget
>
>