All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Calvin Wan <calvinwan@google.com>,
	Elijah Newren <newren@gmail.com>,
	Elijah Newren <newren@gmail.com>,
	Elijah Newren <newren@gmail.com>
Subject: [PATCH v3 02/23] treewide: be explicit about dependence on advice.h
Date: Tue, 11 Apr 2023 03:00:39 +0000	[thread overview]
Message-ID: <af2c81883f2ee55a8ef6bc093f9b08ecf48dfbbd.1681182062.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1509.v3.git.1681182060.gitgitgadget@gmail.com>

From: Elijah Newren <newren@gmail.com>

Dozens of files made use of advice functions, without explicitly
including advice.h.  This made it more difficult to find which files
could remove a dependence on cache.h.  Make C files explicitly include
advice.h if they are using it.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Calvin Wan <calvinwan@google.com>
---
 add-patch.c               | 1 +
 branch.c                  | 1 +
 builtin/add.c             | 1 +
 builtin/am.c              | 1 +
 builtin/clone.c           | 1 +
 builtin/commit.c          | 1 +
 builtin/fetch.c           | 1 +
 builtin/merge-recursive.c | 1 +
 builtin/merge.c           | 1 +
 builtin/mv.c              | 1 +
 builtin/pull.c            | 1 +
 builtin/push.c            | 1 +
 builtin/reset.c           | 1 +
 builtin/tag.c             | 1 +
 cache.h                   | 1 -
 config.c                  | 1 +
 convert.c                 | 1 +
 editor.c                  | 1 +
 notes-merge.c             | 1 +
 object-name.c             | 1 +
 refs.c                    | 1 +
 sequencer.c               | 1 +
 transport.c               | 1 +
 unpack-trees.c            | 1 +
 wt-status.c               | 1 +
 25 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/add-patch.c b/add-patch.c
index 1e1ee2df596..b381f14a7de 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "add-interactive.h"
+#include "advice.h"
 #include "alloc.h"
 #include "environment.h"
 #include "gettext.h"
diff --git a/branch.c b/branch.c
index 99a0e7889e4..3a087b8b4c1 100644
--- a/branch.c
+++ b/branch.c
@@ -1,5 +1,6 @@
 #include "git-compat-util.h"
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "branch.h"
 #include "environment.h"
diff --git a/builtin/add.c b/builtin/add.c
index f12054d9be1..d3c51e28142 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -5,6 +5,7 @@
  */
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "builtin.h"
 #include "lockfile.h"
diff --git a/builtin/am.c b/builtin/am.c
index cd1e20f24e5..8d876f31546 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -6,6 +6,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "abspath.h"
+#include "advice.h"
 #include "config.h"
 #include "builtin.h"
 #include "environment.h"
diff --git a/builtin/clone.c b/builtin/clone.c
index c171def1f3e..f1e8aa3f27e 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -11,6 +11,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "abspath.h"
+#include "advice.h"
 #include "config.h"
 #include "environment.h"
 #include "gettext.h"
diff --git a/builtin/commit.c b/builtin/commit.c
index 9d8e1ea91a3..b09017e04f9 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -7,6 +7,7 @@
 
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "lockfile.h"
 #include "cache-tree.h"
diff --git a/builtin/fetch.c b/builtin/fetch.c
index ffe0e214592..f2b80987751 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -2,6 +2,7 @@
  * "git fetch"
  */
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "gettext.h"
 #include "environment.h"
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c
index 8ea9dc78aa1..25f42f2be7e 100644
--- a/builtin/merge-recursive.c
+++ b/builtin/merge-recursive.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "builtin.h"
+#include "advice.h"
 #include "commit.h"
 #include "gettext.h"
 #include "tag.h"
diff --git a/builtin/merge.c b/builtin/merge.c
index a99be9610e9..225b7064066 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -9,6 +9,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
 #include "abspath.h"
+#include "advice.h"
 #include "alloc.h"
 #include "config.h"
 #include "environment.h"
diff --git a/builtin/mv.c b/builtin/mv.c
index b7c5ffbd8c7..8f7770aa32b 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -6,6 +6,7 @@
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
 #include "abspath.h"
+#include "advice.h"
 #include "alloc.h"
 #include "config.h"
 #include "environment.h"
diff --git a/builtin/pull.c b/builtin/pull.c
index 5405d09f22f..636ce12c94d 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -7,6 +7,7 @@
  */
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "builtin.h"
 #include "gettext.h"
diff --git a/builtin/push.c b/builtin/push.c
index a99ba38a368..6001e4ae0a4 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -2,6 +2,7 @@
  * "git push"
  */
 #include "cache.h"
+#include "advice.h"
 #include "branch.h"
 #include "config.h"
 #include "environment.h"
diff --git a/builtin/reset.c b/builtin/reset.c
index 4d639ec6b37..d8c52cc6edf 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -9,6 +9,7 @@
  */
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
+#include "advice.h"
 #include "config.h"
 #include "environment.h"
 #include "gettext.h"
diff --git a/builtin/tag.c b/builtin/tag.c
index bfd51389571..3e801f54a07 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -7,6 +7,7 @@
  */
 
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "builtin.h"
 #include "environment.h"
diff --git a/cache.h b/cache.h
index c8ae80fded3..d9ca2688d8c 100644
--- a/cache.h
+++ b/cache.h
@@ -5,7 +5,6 @@
 #include "strbuf.h"
 #include "hashmap.h"
 #include "list.h"
-#include "advice.h"
 #include "gettext.h"
 #include "convert.h"
 #include "string-list.h"
diff --git a/config.c b/config.c
index e5c2e477319..3cee6538f3f 100644
--- a/config.c
+++ b/config.c
@@ -7,6 +7,7 @@
  */
 #include "cache.h"
 #include "abspath.h"
+#include "advice.h"
 #include "alloc.h"
 #include "date.h"
 #include "branch.h"
diff --git a/convert.c b/convert.c
index 126036ec330..59127706448 100644
--- a/convert.c
+++ b/convert.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "gettext.h"
 #include "hex.h"
diff --git a/editor.c b/editor.c
index d632d790660..3bea3ef72f7 100644
--- a/editor.c
+++ b/editor.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "abspath.h"
+#include "advice.h"
 #include "config.h"
 #include "environment.h"
 #include "gettext.h"
diff --git a/notes-merge.c b/notes-merge.c
index 19405ec71ac..0258f87d21f 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "commit.h"
 #include "gettext.h"
 #include "refs.h"
diff --git a/object-name.c b/object-name.c
index 53f9d359ee8..ff647d6c7b5 100644
--- a/object-name.c
+++ b/object-name.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "environment.h"
 #include "gettext.h"
diff --git a/refs.c b/refs.c
index 0f369dbde7a..cfced6f174a 100644
--- a/refs.c
+++ b/refs.c
@@ -3,6 +3,7 @@
  */
 
 #include "cache.h"
+#include "advice.h"
 #include "alloc.h"
 #include "config.h"
 #include "environment.h"
diff --git a/sequencer.c b/sequencer.c
index 1a315ac13c9..eaba379e3ad 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "abspath.h"
+#include "advice.h"
 #include "alloc.h"
 #include "config.h"
 #include "environment.h"
diff --git a/transport.c b/transport.c
index 11b38d16dcf..82bf2496ba7 100644
--- a/transport.c
+++ b/transport.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "alloc.h"
 #include "config.h"
 #include "environment.h"
diff --git a/unpack-trees.c b/unpack-trees.c
index d41489b4adb..c6de2ca5a7e 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "strvec.h"
 #include "repository.h"
 #include "config.h"
diff --git a/wt-status.c b/wt-status.c
index ccbfd9cc6de..47f223c0f8d 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "wt-status.h"
 #include "object.h"
 #include "dir.h"
-- 
gitgitgadget


  parent reply	other threads:[~2023-04-11  3:01 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01 15:10 [PATCH 00/24] Header cleanups (splitting up cache.h) Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 01/24] treewide: be explicit about dependence on trace.h & trace2.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 02/24] treewide: be explicit about dependence on advice.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 03/24] treewide: be explicit about dependence on convert.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 04/24] treewide: be explicit about dependence on pack-revindex.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 05/24] treewide: be explicit about dependence on oid-array.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 06/24] treewide: be explicit about dependence on mem-pool.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 07/24] treewide: remove unnecessary cache.h inclusion Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 08/24] object-name.h: move declarations for object-name.c functions from cache.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 09/24] treewide: remove cache.h inclusion due to object-name.h changes Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 10/24] git-zlib: move declarations for git-zlib functions from cache.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 11/24] treewide: remove cache.h inclusion due to git-zlib changes Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 12/24] object-file.h: move declarations for object-file.c functions from cache.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 13/24] treewide: remove cache.h inclusion due to object-file.h changes Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 14/24] object.h: move an inline function and some defines from cache.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 15/24] editor: move editor-related functions and declarations into common file Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 16/24] treewide: remove cache.h inclusion due to editor.h changes Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 17/24] pager.h: move declarations for pager.c functions from cache.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 18/24] treewide: remove cache.h inclusion due to pager.h changes Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 19/24] cache.h: remove unnecessary includes Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 20/24] strbuf: move forward declarations to beginning of file Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 21/24] treewide: remove double forward declaration of read_in_full Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 22/24] treewide: reduce includes of cache.h in other headers Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 23/24] chdir-notify, quote: replace cache.h include with path.h Elijah Newren via GitGitGadget
2023-04-01 15:10 ` [PATCH 24/24] mailmap, quote: move declarations of global vars to correct unit Elijah Newren via GitGitGadget
2023-04-03 16:23 ` [PATCH 00/24] Header cleanups (splitting up cache.h) Elijah Newren
2023-04-04  1:22 ` [PATCH v2 " Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 01/24] treewide: be explicit about dependence on trace.h & trace2.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 02/24] treewide: be explicit about dependence on advice.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 03/24] treewide: be explicit about dependence on convert.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 04/24] treewide: be explicit about dependence on pack-revindex.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 05/24] treewide: be explicit about dependence on oid-array.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 06/24] treewide: be explicit about dependence on mem-pool.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 07/24] treewide: remove unnecessary cache.h inclusion Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 08/24] object-name.h: move declarations for object-name.c functions from cache.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 09/24] treewide: remove cache.h inclusion due to object-name.h changes Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 10/24] git-zlib: move declarations for git-zlib functions from cache.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 11/24] treewide: remove cache.h inclusion due to git-zlib changes Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 12/24] object-file.h: move declarations for object-file.c functions from cache.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 13/24] treewide: remove cache.h inclusion due to object-file.h changes Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 14/24] object.h: move some inline functions and defines from cache.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 15/24] treewide: remove cache.h inclusion due to object.h changes Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 16/24] editor: move editor-related functions and declarations into common file Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 17/24] treewide: remove cache.h inclusion due to editor.h changes Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 18/24] pager.h: move declarations for pager.c functions from cache.h Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 19/24] treewide: remove cache.h inclusion due to pager.h changes Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 20/24] cache.h: remove unnecessary includes Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 21/24] strbuf: move forward declarations to beginning of file Elijah Newren via GitGitGadget
2023-04-05 17:28     ` Calvin Wan
2023-04-07  6:07       ` Elijah Newren
2023-04-10 15:52         ` Calvin Wan
2023-04-10 16:47           ` Elijah Newren
2023-04-04  1:22   ` [PATCH v2 22/24] treewide: remove double forward declaration of read_in_full Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 23/24] treewide: reduce includes of cache.h in other headers Elijah Newren via GitGitGadget
2023-04-04  1:22   ` [PATCH v2 24/24] mailmap, quote: move declarations of global vars to correct unit Elijah Newren via GitGitGadget
2023-04-05 17:30   ` [PATCH v2 00/24] Header cleanups (splitting up cache.h) Calvin Wan
2023-04-07  7:08     ` Elijah Newren
2023-04-10 15:54       ` Calvin Wan
2023-04-11  3:00   ` [PATCH v3 00/23] " Elijah Newren via GitGitGadget
2023-04-11  3:00     ` [PATCH v3 01/23] treewide: be explicit about dependence on trace.h & trace2.h Elijah Newren via GitGitGadget
2023-04-11  3:00     ` Elijah Newren via GitGitGadget [this message]
2023-04-11  3:00     ` [PATCH v3 03/23] treewide: be explicit about dependence on convert.h Elijah Newren via GitGitGadget
2023-04-11  3:00     ` [PATCH v3 04/23] treewide: be explicit about dependence on pack-revindex.h Elijah Newren via GitGitGadget
2023-04-11  3:00     ` [PATCH v3 05/23] treewide: be explicit about dependence on oid-array.h Elijah Newren via GitGitGadget
2023-04-11  7:41     ` [PATCH v3 06/23] treewide: be explicit about dependence on mem-pool.h Elijah Newren
2023-04-11  7:41       ` [PATCH v3 07/23] treewide: remove unnecessary cache.h inclusion Elijah Newren
2023-04-15 11:06         ` [PATCH/RFD] fix connection via git protocol Michael J Gruber
2023-04-16  5:47           ` Elijah Newren
2023-04-16  5:51             ` Elijah Newren
2023-04-16 11:21               ` Michael J Gruber
2023-04-17  7:38             ` Jeff King
2023-04-17 16:33               ` Junio C Hamano
2023-04-17 18:31                 ` Junio C Hamano
2023-04-18  3:39                 ` Jeff King
2023-04-18 20:47                   ` Junio C Hamano
2023-04-18  1:56               ` Elijah Newren
2023-04-18  3:40                 ` Jeff King
2023-04-17 16:29             ` Junio C Hamano
2023-04-18  1:55               ` Elijah Newren
2023-04-18 21:00                 ` Junio C Hamano
2023-04-18 21:24                   ` Eric Sunshine
2023-04-19  3:16                     ` Elijah Newren
2023-04-24 20:57                     ` Junio C Hamano
2023-04-19  3:15                   ` Elijah Newren
2023-04-11  7:41       ` [PATCH v3 08/23] object-name.h: move declarations for object-name.c functions from cache.h Elijah Newren
2023-04-11  7:41       ` [PATCH v3 09/23] treewide: remove cache.h inclusion due to object-name.h changes Elijah Newren
2023-04-11  7:41       ` [PATCH v3 10/23] git-zlib: move declarations for git-zlib functions from cache.h Elijah Newren
2023-04-11  7:41       ` [PATCH v3 11/23] treewide: remove cache.h inclusion due to git-zlib changes Elijah Newren
2023-04-11  7:41       ` [PATCH v3 12/23] object-file.h: move declarations for object-file.c functions from cache.h Elijah Newren
2023-04-11  7:41       ` [PATCH v3 13/23] treewide: remove cache.h inclusion due to object-file.h changes Elijah Newren
2023-04-11  7:41       ` [PATCH v3 14/23] object.h: move some inline functions and defines from cache.h Elijah Newren
2023-04-11  7:41       ` [PATCH v3 15/23] treewide: remove cache.h inclusion due to object.h changes Elijah Newren
2023-04-11  7:41       ` [PATCH v3 16/23] editor: move editor-related functions and declarations into common file Elijah Newren
2023-04-11  7:41       ` [PATCH v3 17/23] treewide: remove cache.h inclusion due to editor.h changes Elijah Newren
2023-04-11  7:41       ` [PATCH v3 18/23] pager.h: move declarations for pager.c functions from cache.h Elijah Newren
2023-04-11  7:42       ` [PATCH v3 19/23] treewide: remove cache.h inclusion due to pager.h changes Elijah Newren
2023-04-11  7:42       ` [PATCH v3 20/23] cache.h: remove unnecessary includes Elijah Newren
2023-04-11  7:42       ` [PATCH v3 21/23] treewide: remove double forward declaration of read_in_full Elijah Newren
2023-04-11  7:42       ` [PATCH v3 22/23] treewide: reduce includes of cache.h in other headers Elijah Newren
2023-04-11  7:42       ` [PATCH v3 23/23] mailmap, quote: move declarations of global vars to correct unit Elijah Newren
2023-04-11  7:47     ` [PATCH v3 00/23] Header cleanups (splitting up cache.h) Elijah Newren

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af2c81883f2ee55a8ef6bc093f9b08ecf48dfbbd.1681182062.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=calvinwan@google.com \
    --cc=git@vger.kernel.org \
    --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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.