summaryrefslogtreecommitdiffstats
path: root/repo-settings.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-12 13:30:07 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-12 19:15:42 +0200
commitf1d3d07900e42d19f10be55bc2f793034e7d4198 (patch)
treec2b4467cc1ab5b24dc4aa8db337d69c9827e1199 /repo-settings.h
parentrepo-settings: split out declarations into a standalone header (diff)
downloadgit-f1d3d07900e42d19f10be55bc2f793034e7d4198.tar.xz
git-f1d3d07900e42d19f10be55bc2f793034e7d4198.zip
repo-settings: track defaults close to `struct repo_settings`
The default values for `struct repo_settings` are set up in `prepare_repo_settings()`. This is somewhat different from how we typically do this, namely by providing an `INIT` macro that sets up the default values for us. Refactor the code to do the same. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r--repo-settings.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/repo-settings.h b/repo-settings.h
index ff20a96537..28f95695b3 100644
--- a/repo-settings.h
+++ b/repo-settings.h
@@ -50,6 +50,11 @@ struct repo_settings {
int core_multi_pack_index;
};
+#define REPO_SETTINGS_INIT { \
+ .index_version = -1, \
+ .core_untracked_cache = UNTRACKED_CACHE_KEEP, \
+ .fetch_negotiation_algorithm = FETCH_NEGOTIATION_CONSECUTIVE, \
+}
void prepare_repo_settings(struct repository *r);