Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-06-23 02:29:05 +0300
committerJunio C Hamano <gitster@pobox.com>2023-06-23 02:29:06 +0300
commitd9f9f6b358c4d8aad492bc4995be0926048a6248 (patch)
tree62cf18a137ffecb83675d7d5dda4f2f43d33253d /commit-graph.c
parentf2ffc7418685f75e43e2919426276141fd62c656 (diff)
parent9c7d1b057ff36ee4190621d46e9fe3c83377aea7 (diff)
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()
Diffstat (limited to 'commit-graph.c')
-rw-r--r--commit-graph.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/commit-graph.c b/commit-graph.c
index 843bdb458d..fd0ff8c7b8 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -204,14 +204,12 @@ static struct commit_graph *alloc_commit_graph(void)
return g;
}
-extern int read_replace_refs;
-
static int commit_graph_compatible(struct repository *r)
{
if (!r->gitdir)
return 0;
- if (read_replace_refs) {
+ if (replace_refs_enabled(r)) {
prepare_replace_object(r);
if (hashmap_get_size(&r->objects->replace_map->map))
return 0;