summaryrefslogtreecommitdiff
path: root/repository.h
diff options
context:
space:
mode:
Diffstat (limited to 'repository.h')
-rw-r--r--repository.h36
1 files changed, 27 insertions, 9 deletions
diff --git a/repository.h b/repository.h
index 24316ac944..41ed22543a 100644
--- a/repository.h
+++ b/repository.h
@@ -1,9 +1,6 @@
#ifndef REPOSITORY_H
#define REPOSITORY_H
-#include "git-compat-util.h"
-#include "path.h"
-
struct config_set;
struct fsmonitor_settings;
struct git_hash_algo;
@@ -27,6 +24,10 @@ enum fetch_negotiation_setting {
FETCH_NEGOTIATION_NOOP,
};
+#define REF_STORAGE_FORMAT_UNKNOWN 0
+#define REF_STORAGE_FORMAT_FILES 1
+#define REF_STORAGE_FORMAT_REFTABLE 2
+
struct repo_settings {
int initialized;
@@ -37,10 +38,23 @@ struct repo_settings {
int fetch_write_commit_graph;
int command_requires_full_index;
int sparse_index;
+ int pack_read_reverse_index;
+ int pack_use_bitmap_boundary_traversal;
+ int pack_use_multi_pack_reuse;
+
+ /*
+ * Does this repository have core.useReplaceRefs=true (on by
+ * default)? This provides a repository-scoped version of this
+ * config, though it could be disabled process-wide via some Git
+ * builtins or the --no-replace-objects option. See
+ * replace_refs_enabled() for more details.
+ */
+ int read_replace_refs;
struct fsmonitor_settings *fsmonitor; /* lazily loaded */
int index_version;
+ int index_skip_hash;
enum untracked_cache_setting core_untracked_cache;
int pack_use_sparse;
@@ -55,8 +69,6 @@ struct repo_path_cache {
char *merge_rr;
char *merge_mode;
char *merge_head;
- char *merge_autostash;
- char *auto_merge;
char *fetch_head;
char *shallow;
};
@@ -151,6 +163,12 @@ struct repository {
/* Repository's current hash algorithm, as serialized on disk. */
const struct git_hash_algo *hash_algo;
+ /* Repository's compatibility hash algorithm. */
+ const struct git_hash_algo *compat_hash_algo;
+
+ /* Repository's reference storage format, as serialized on disk. */
+ unsigned int ref_storage_format;
+
/* A unique-id for tracing purposes. */
int trace2_repo_id;
@@ -162,6 +180,7 @@ struct repository {
struct promisor_remote_config *promisor_remote_config;
/* Configurations */
+ int repository_format_worktree_config;
/* Indicate if a repository has a different 'commondir' from 'gitdir' */
unsigned different_commondir:1;
@@ -186,7 +205,9 @@ void repo_set_gitdir(struct repository *repo, const char *root,
const struct set_gitdir_args *extra_args);
void repo_set_worktree(struct repository *repo, const char *path);
void repo_set_hash_algo(struct repository *repo, int algo);
-void initialize_the_repository(void);
+void repo_set_compat_hash_algo(struct repository *repo, int compat_algo);
+void repo_set_ref_storage_format(struct repository *repo, unsigned int format);
+void initialize_repository(struct repository *repo);
RESULT_MUST_BE_USED
int repo_init(struct repository *r, const char *gitdir, const char *worktree);
@@ -219,9 +240,6 @@ int repo_hold_locked_index(struct repository *repo,
struct lock_file *lf,
int flags);
-int repo_read_index_preload(struct repository *,
- const struct pathspec *pathspec,
- unsigned refresh_flags);
int repo_read_index_unmerged(struct repository *);
/*
* Opportunistically update the index but do not complain if we can't.