Merge branch 'ds/disable-replace-refs'

Introduce a mechanism to disable replace refs globally and per
repository.

* ds/disable-replace-refs:
  repository: create read_replace_refs setting
  replace-objects: create wrapper around setting
  repository: create disable_replace_refs()
This commit is contained in:
Junio C Hamano
2023-06-22 16:29:05 -07:00
19 changed files with 111 additions and 31 deletions

View File

@@ -39,6 +39,15 @@ struct repo_settings {
int pack_read_reverse_index;
int pack_use_bitmap_boundary_traversal;
/*
* 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;