]> git.ipfire.org Git - thirdparty/git.git/commitdiff
replace-object.h: move read_replace_refs declaration from cache.h to here
authorElijah Newren <newren@gmail.com>
Fri, 24 Feb 2023 00:09:33 +0000 (00:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Feb 2023 01:25:30 +0000 (17:25 -0800)
Adjust several files to be more explicit about their dependency on
replace-objects to accommodate this change.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
builtin/cat-file.c
builtin/commit-graph.c
builtin/fsck.c
builtin/index-pack.c
builtin/pack-objects.c
builtin/prune.c
builtin/replace.c
builtin/unpack-objects.c
builtin/upload-pack.c
cache.h
config.c
environment.c
git.c
log-tree.c
replace-object.h

index 88c5ea8b26753bf242719883a44b46989b051518..b7a73acb074b22f9b69856aac3d340c93c084720 100644 (file)
@@ -18,6 +18,7 @@
 #include "oid-array.h"
 #include "packfile.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "promisor-remote.h"
 #include "mailmap.h"
 
index 6dc83dc51b319019254fa68a5281579e71838826..d3be7f3b3189b89b6345e367911129cf3c196239 100644 (file)
@@ -8,6 +8,7 @@
 #include "commit-graph.h"
 #include "object-store.h"
 #include "progress.h"
+#include "replace-object.h"
 #include "tag.h"
 
 #define BUILTIN_COMMIT_GRAPH_VERIFY_USAGE \
index af0fab660dce5803df3b1b9e4d61371f2b3098d3..134b0bd18cd7d4cc207fcc580f95367df848b13a 100644 (file)
@@ -20,6 +20,7 @@
 #include "decorate.h"
 #include "packfile.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "resolve-undo.h"
 #include "run-command.h"
 #include "worktree.h"
index 21c0e109dd288c6c5c4be7e41cb39cad12a4cb63..b451755f405a89bf8bfdfd28e288a6c7e1dbedf1 100644 (file)
@@ -16,6 +16,7 @@
 #include "thread-utils.h"
 #include "packfile.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "promisor-remote.h"
 
 static const char index_pack_usage[] =
index 2b5e85988c9d9579b66bb3a415b61fed34b6e37c..2e73284f107d2500c8d7e9dabc039e538116d8d0 100644 (file)
@@ -32,6 +32,7 @@
 #include "list.h"
 #include "packfile.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "dir.h"
 #include "midx.h"
 #include "trace2.h"
index db767b7a8fab57b956ff63fc30cbd16371d8f027..f2ed45ccf036f43072924c57f81a9fd2d0e0beb0 100644 (file)
@@ -8,6 +8,7 @@
 #include "parse-options.h"
 #include "progress.h"
 #include "prune-packed.h"
+#include "replace-object.h"
 #include "object-store.h"
 #include "shallow.h"
 
index cdcb39f737c85ccbf59473c20dc3b696e7e9b30a..71d8e949e353c8583c5a3cbf383edab3544c95c2 100644 (file)
@@ -16,6 +16,7 @@
 #include "parse-options.h"
 #include "run-command.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "repository.h"
 #include "tag.h"
 
index e125b1218837bb183be7e57cbc391ff094104564..1908dcfcffb7b89234cdcd788f1302e307beed2b 100644 (file)
@@ -9,6 +9,7 @@
 #include "pack.h"
 #include "blob.h"
 #include "commit.h"
+#include "replace-object.h"
 #include "tag.h"
 #include "tree.h"
 #include "tree-walk.h"
index 25b69da2bf2815796d885030c91dbf177a4c4e2e..7a3c68720f14666cb839dd22cb5dd41688405cea 100644 (file)
@@ -4,6 +4,7 @@
 #include "pkt-line.h"
 #include "parse-options.h"
 #include "protocol.h"
+#include "replace-object.h"
 #include "upload-pack.h"
 #include "serve.h"
 
diff --git a/cache.h b/cache.h
index fdb3125f00d9bbb396c354c4cd301ba0fc77e92f..0221bc6d5c9922531b7cbd4f05882ab82cfc6e6a 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -886,14 +886,6 @@ void set_shared_repository(int value);
 int get_shared_repository(void);
 void reset_shared_repository(void);
 
-/*
- * Do replace refs need to be checked this run?  This variable is
- * initialized to true unless --no-replace-object is used or
- * $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some
- * commands that do not want replace references to be active.
- */
-extern int read_replace_refs;
-
 /*
  * These values are used to help identify parts of a repository to fsync.
  * FSYNC_COMPONENT_NONE identifies data that will not be a persistent part of the
index d3ab9417a4500b61f4c631cd27fca3f878bf1b32..d0aff55fa66b7f57f29a958092ce898034547ec3 100644 (file)
--- a/config.c
+++ b/config.c
@@ -23,6 +23,7 @@
 #include "utf8.h"
 #include "dir.h"
 #include "color.h"
+#include "replace-object.h"
 #include "refs.h"
 #include "worktree.h"
 
index 1ee3686fd8a34270db8d47738f2ea12fcdbc1976..89d89110e4190c8220c13469c3c72c1a5f6f8f6d 100644 (file)
@@ -17,6 +17,7 @@
 #include "commit.h"
 #include "strvec.h"
 #include "object-store.h"
+#include "replace-object.h"
 #include "tmp-objdir.h"
 #include "chdir-notify.h"
 #include "shallow.h"
diff --git a/git.c b/git.c
index 96b0a2837dcd69d875181fe6b9f395f1703c4583..389f46887e62dae2791eba89898470f66d81eb8d 100644 (file)
--- a/git.c
+++ b/git.c
@@ -4,6 +4,7 @@
 #include "help.h"
 #include "run-command.h"
 #include "alias.h"
+#include "replace-object.h"
 #include "shallow.h"
 
 #define RUN_SETUP              (1<<0)
index ee3dfb6b6593eb9ba7c301f480aca28c2846eeff..043e0df685b7db16dff71d92900dcf8b04f6a0d2 100644 (file)
@@ -13,6 +13,7 @@
 #include "merge-ort.h"
 #include "reflog-walk.h"
 #include "refs.h"
+#include "replace-object.h"
 #include "string-list.h"
 #include "color.h"
 #include "gpg-interface.h"
index 3c92ae94610ad0a104fbd3ea6d4ed759a0c699f0..500482b02b38ce30ee51a005d00ca00e76033f19 100644 (file)
@@ -1,11 +1,18 @@
 #ifndef REPLACE_OBJECT_H
 #define REPLACE_OBJECT_H
 
-#include "cache.h"
 #include "oidmap.h"
 #include "repository.h"
 #include "object-store.h"
 
+/*
+ * Do replace refs need to be checked this run?  This variable is
+ * initialized to true unless --no-replace-object is used or
+ * $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some
+ * commands that do not want replace references to be active.
+ */
+extern int read_replace_refs;
+
 struct replace_object {
        struct oidmap_entry original;
        struct object_id replacement;