From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Emily Shaffer <nasamuffin@google.com>,
Derrick Stolee <derrickstolee@github.com>,
Elijah Newren <newren@gmail.com>,
Elijah Newren <newren@gmail.com>,
Elijah Newren <newren@gmail.com>
Subject: [PATCH v2 14/17] replace-object.h: move read_replace_refs declaration from cache.h to here
Date: Fri, 24 Feb 2023 00:09:33 +0000 [thread overview]
Message-ID: <c4f86b77e71622ec8a76b6d8eabf45b3d81e4892.1677197378.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1485.v2.git.1677197376.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>
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>
---
builtin/cat-file.c | 1 +
builtin/commit-graph.c | 1 +
builtin/fsck.c | 1 +
builtin/index-pack.c | 1 +
builtin/pack-objects.c | 1 +
builtin/prune.c | 1 +
builtin/replace.c | 1 +
builtin/unpack-objects.c | 1 +
builtin/upload-pack.c | 1 +
cache.h | 8 --------
config.c | 1 +
environment.c | 1 +
git.c | 1 +
log-tree.c | 1 +
replace-object.h | 9 ++++++++-
15 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 88c5ea8b267..b7a73acb074 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -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"
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index 6dc83dc51b3..d3be7f3b318 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -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 \
diff --git a/builtin/fsck.c b/builtin/fsck.c
index af0fab660dc..134b0bd18cd 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -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"
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 21c0e109dd2..b451755f405 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -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[] =
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 2b5e85988c9..2e73284f107 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -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"
diff --git a/builtin/prune.c b/builtin/prune.c
index db767b7a8fa..f2ed45ccf03 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -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"
diff --git a/builtin/replace.c b/builtin/replace.c
index cdcb39f737c..71d8e949e35 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -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"
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index e125b121883..1908dcfcffb 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -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"
diff --git a/builtin/upload-pack.c b/builtin/upload-pack.c
index 25b69da2bf2..7a3c68720f1 100644
--- a/builtin/upload-pack.c
+++ b/builtin/upload-pack.c
@@ -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 fdb3125f00d..0221bc6d5c9 100644
--- 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
diff --git a/config.c b/config.c
index d3ab9417a45..d0aff55fa66 100644
--- 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"
diff --git a/environment.c b/environment.c
index 1ee3686fd8a..89d89110e41 100644
--- a/environment.c
+++ b/environment.c
@@ -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 96b0a2837dc..389f46887e6 100644
--- 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)
diff --git a/log-tree.c b/log-tree.c
index ee3dfb6b659..043e0df685b 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -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"
diff --git a/replace-object.h b/replace-object.h
index 3c92ae94610..500482b02b3 100644
--- a/replace-object.h
+++ b/replace-object.h
@@ -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;
--
gitgitgadget
next prev parent reply other threads:[~2023-02-24 0:10 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 8:05 [PATCH 00/16] Header cleanups Elijah Newren via GitGitGadget
2023-02-23 8:05 ` [PATCH 01/16] treewide: ensure one of the appropriate headers is sourced first Elijah Newren via GitGitGadget
2023-02-23 8:05 ` [PATCH 02/16] treewide: remove unnecessary git-compat-util.h includes in headers Elijah Newren via GitGitGadget
2023-02-23 13:52 ` Derrick Stolee
2023-02-23 18:13 ` Elijah Newren
2023-02-23 19:35 ` Junio C Hamano
2023-02-23 19:53 ` Elijah Newren
2023-02-23 22:07 ` Junio C Hamano
2023-02-23 23:41 ` Elijah Newren
2023-02-23 8:05 ` [PATCH 03/16] treewide: remove unnecessary cache.h includes Elijah Newren via GitGitGadget
2023-02-23 8:05 ` [PATCH 04/16] treewide: remove unnecessary cache.h includes in source files Elijah Newren via GitGitGadget
2023-02-23 13:57 ` Derrick Stolee
2023-02-23 8:05 ` [PATCH 05/16] alloc.h: move ALLOC_GROW() functions from cache.h Elijah Newren via GitGitGadget
2023-02-23 14:06 ` Derrick Stolee
2023-02-23 18:22 ` Elijah Newren
2023-02-23 19:40 ` Junio C Hamano
2023-02-23 19:39 ` Junio C Hamano
2023-02-23 8:05 ` [PATCH 06/16] hash.h: move some oid-related declarations " Elijah Newren via GitGitGadget
2023-02-23 14:08 ` Derrick Stolee
2023-02-23 18:25 ` Elijah Newren
2023-02-24 23:55 ` Jonathan Tan
2023-02-23 8:05 ` [PATCH 07/16] hex.h: move some hex-related " Elijah Newren via GitGitGadget
2023-02-23 14:11 ` Derrick Stolee
2023-02-23 19:31 ` Elijah Newren
2023-02-23 8:05 ` [PATCH 08/16] pretty.h: move has_non_ascii() declaration from commit.h Elijah Newren via GitGitGadget
2023-02-23 8:05 ` [PATCH 09/16] ident.h: move ident-related declarations out of cache.h Elijah Newren via GitGitGadget
2023-02-23 8:05 ` [PATCH 10/16] object.h: stop depending on cache.h; make cache.h depend on object.h Elijah Newren via GitGitGadget
2023-02-23 14:17 ` Derrick Stolee
2023-02-23 19:55 ` Elijah Newren
2023-02-23 8:05 ` [PATCH 11/16] dir.h: refactor to no longer need to include cache.h Elijah Newren via GitGitGadget
2023-02-23 8:05 ` [PATCH 12/16] object-store.h: move struct object_info from cache.h Elijah Newren via GitGitGadget
2023-02-23 14:20 ` Derrick Stolee
2023-02-23 19:55 ` Elijah Newren
2023-02-23 8:05 ` [PATCH 13/16] replace-object.h: move read_replace_refs declaration from cache.h to here Elijah Newren via GitGitGadget
2023-02-23 8:05 ` [PATCH 14/16] treewide: replace cache.h with more direct headers, where possible Elijah Newren via GitGitGadget
2023-02-23 8:05 ` [PATCH 15/16] Remove unnecessary includes of builtin.h Elijah Newren via GitGitGadget
2023-02-23 8:05 ` [PATCH 16/16] diff.h: remove unnecessary include of object.h Elijah Newren via GitGitGadget
2023-02-23 14:27 ` [PATCH 00/16] Header cleanups Derrick Stolee
2023-02-24 0:09 ` [PATCH v2 00/17] " Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 01/17] treewide: ensure one of the appropriate headers is sourced first Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 02/17] treewide: remove unnecessary git-compat-util.h includes in headers Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 03/17] treewide: remove unnecessary cache.h includes Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 04/17] treewide: remove unnecessary cache.h includes in source files Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 05/17] alloc.h: move ALLOC_GROW() functions from cache.h Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 06/17] hash.h: move some oid-related declarations " Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 07/17] hex.h: move some hex-related " Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 08/17] cache.h: remove dependence on hex.h; make other files include it explicitly Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 09/17] pretty.h: move has_non_ascii() declaration from commit.h Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 10/17] ident.h: move ident-related declarations out of cache.h Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 11/17] object.h: stop depending on cache.h; make cache.h depend on object.h Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 12/17] dir.h: refactor to no longer need to include cache.h Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 13/17] object-store.h: move struct object_info from cache.h Elijah Newren via GitGitGadget
2023-02-24 0:09 ` Elijah Newren via GitGitGadget [this message]
2023-02-24 0:09 ` [PATCH v2 15/17] treewide: replace cache.h with more direct headers, where possible Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 16/17] Remove unnecessary includes of builtin.h Elijah Newren via GitGitGadget
2023-02-24 0:09 ` [PATCH v2 17/17] diff.h: remove unnecessary include of object.h Elijah Newren via GitGitGadget
2023-02-24 14:03 ` [PATCH v2 00/17] Header cleanups Johannes Schindelin
2023-02-25 0:10 ` Jonathan Tan
2023-02-25 0:57 ` Elijah Newren
2023-02-27 13:51 ` Derrick Stolee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4f86b77e71622ec8a76b6d8eabf45b3d81e4892.1677197378.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=nasamuffin@google.com \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).