refspec: store raw refspecs inside refspec_item
[git/gitster.git] / repo-settings.h
blob51d6156a1172e3a504a2c11abb134a5cff927d89
1 #ifndef REPO_SETTINGS_H
2 #define REPO_SETTINGS_H
4 struct fsmonitor_settings;
5 struct repository;
7 enum untracked_cache_setting {
8 UNTRACKED_CACHE_KEEP,
9 UNTRACKED_CACHE_REMOVE,
10 UNTRACKED_CACHE_WRITE,
13 enum fetch_negotiation_setting {
14 FETCH_NEGOTIATION_CONSECUTIVE,
15 FETCH_NEGOTIATION_SKIPPING,
16 FETCH_NEGOTIATION_NOOP,
19 enum log_refs_config {
20 LOG_REFS_UNSET = -1,
21 LOG_REFS_NONE = 0,
22 LOG_REFS_NORMAL,
23 LOG_REFS_ALWAYS
26 struct repo_settings {
27 int initialized;
29 int core_commit_graph;
30 int commit_graph_generation_version;
31 int commit_graph_changed_paths_version;
32 int gc_write_commit_graph;
33 int fetch_write_commit_graph;
34 int command_requires_full_index;
35 int sparse_index;
36 int pack_read_reverse_index;
37 int pack_use_bitmap_boundary_traversal;
38 int pack_use_multi_pack_reuse;
41 * Does this repository have core.useReplaceRefs=true (on by
42 * default)? This provides a repository-scoped version of this
43 * config, though it could be disabled process-wide via some Git
44 * builtins or the --no-replace-objects option. See
45 * replace_refs_enabled() for more details.
47 int read_replace_refs;
49 struct fsmonitor_settings *fsmonitor; /* lazily loaded */
51 int index_version;
52 int index_skip_hash;
53 enum untracked_cache_setting core_untracked_cache;
55 int pack_use_sparse;
56 enum fetch_negotiation_setting fetch_negotiation_algorithm;
58 int core_multi_pack_index;
59 int warn_ambiguous_refs; /* lazily loaded via accessor */
61 #define REPO_SETTINGS_INIT { \
62 .index_version = -1, \
63 .core_untracked_cache = UNTRACKED_CACHE_KEEP, \
64 .fetch_negotiation_algorithm = FETCH_NEGOTIATION_CONSECUTIVE, \
65 .warn_ambiguous_refs = -1, \
68 void prepare_repo_settings(struct repository *r);
70 /* Read the value for "core.logAllRefUpdates". */
71 enum log_refs_config repo_settings_get_log_all_ref_updates(struct repository *repo);
72 /* Read the value for "core.warnAmbiguousRefs". */
73 int repo_settings_get_warn_ambiguous_refs(struct repository *repo);
75 #endif /* REPO_SETTINGS_H */