]> git.ipfire.org Git - thirdparty/git.git/commitdiff
treewide: be explicit about dependence on advice.h
authorElijah Newren <newren@gmail.com>
Tue, 11 Apr 2023 03:00:39 +0000 (03:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Apr 2023 15:52:09 +0000 (08:52 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
25 files changed:
add-patch.c
branch.c
builtin/add.c
builtin/am.c
builtin/clone.c
builtin/commit.c
builtin/fetch.c
builtin/merge-recursive.c
builtin/merge.c
builtin/mv.c
builtin/pull.c
builtin/push.c
builtin/reset.c
builtin/tag.c
cache.h
config.c
convert.c
editor.c
notes-merge.c
object-name.c
refs.c
sequencer.c
transport.c
unpack-trees.c
wt-status.c

index 1e1ee2df59674ebf5340ae77b8e00a3de30f1947..b381f14a7de525d296af3d10871281dd80e5761d 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "add-interactive.h"
+#include "advice.h"
 #include "alloc.h"
 #include "environment.h"
 #include "gettext.h"
index 99a0e7889e42226ce8230e8d0472268bcfec7fe5..3a087b8b4c1870e45293db26dba413a945d6f019 100644 (file)
--- 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"
index f12054d9be113b5fa63bd0df1445ae59343d4cd5..d3c51e28142600f224c98edf4a9e451591666df9 100644 (file)
@@ -5,6 +5,7 @@
  */
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "builtin.h"
 #include "lockfile.h"
index cd1e20f24e542360fbc7bcb7b6ada156d13bf89d..8d876f315463e7931eb5252b81b4851b66703b87 100644 (file)
@@ -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"
index c171def1f3edf2dd11bf545d7d7b84d8e9c62ff7..f1e8aa3f27ed3d80680ece0ab67c2ec8cd24be1b 100644 (file)
@@ -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"
index 9d8e1ea91a327248799cf137ef3c0aaf0fc65ed1..b09017e04f98e8acb0c5b306fb838d5b2fa50a97 100644 (file)
@@ -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"
index ffe0e2145929f1810db21f96fc9be5137336523c..f2b80987751a626e5b6498926fdb87720791306c 100644 (file)
@@ -2,6 +2,7 @@
  * "git fetch"
  */
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "gettext.h"
 #include "environment.h"
index 8ea9dc78aa158e2c484ad822e6cd2e03d9aa91a2..25f42f2be7ed73233f0a0cc6b3c38b7f82c0f9d8 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "builtin.h"
+#include "advice.h"
 #include "commit.h"
 #include "gettext.h"
 #include "tag.h"
index a99be9610e9bc1950deb0afd9c47395ccc6a3ab1..225b70640660c59395a6731c4a7e646439f7c112 100644 (file)
@@ -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"
index b7c5ffbd8c796f5848523ac8fbe450ce425be13d..8f7770aa32bf5e3ef5352c4806166d5c0a282238 100644 (file)
@@ -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"
index 5405d09f22fbf5b2c5b036650d175ba3e7d1eaae..636ce12c94d5e00126d9c24ce01c5fad70327b1b 100644 (file)
@@ -7,6 +7,7 @@
  */
 #define USE_THE_INDEX_VARIABLE
 #include "cache.h"
+#include "advice.h"
 #include "config.h"
 #include "builtin.h"
 #include "gettext.h"
index a99ba38a36874bf31f5a44930a515c6e73cedf0d..6001e4ae0a4723af3a23c6334936bc094b7a8895 100644 (file)
@@ -2,6 +2,7 @@
  * "git push"
  */
 #include "cache.h"
+#include "advice.h"
 #include "branch.h"
 #include "config.h"
 #include "environment.h"
index 4d639ec6b3764df78acef83ffee47ff678d21650..d8c52cc6edf1b2d3c8a79a27983198e200369d21 100644 (file)
@@ -9,6 +9,7 @@
  */
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
+#include "advice.h"
 #include "config.h"
 #include "environment.h"
 #include "gettext.h"
index bfd51389571f561e858e5735ecfd3e83ca1a58d6..3e801f54a07adeaa5e9094f5c3e038d182f2de61 100644 (file)
@@ -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 c8ae80fded35d77308333fa209bb719c83e54be2..d9ca2688d8c385cd80f7749e4ae4e0caef361fb2 100644 (file)
--- 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"
index e5c2e4773197cff8f8592d1188adf5fe880810bc..3cee6538f3f2826506a8af52ad197908dd7d1591 100644 (file)
--- 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"
index 126036ec330f9c63f5dd5965e9cce12acd455e74..591277064486501c9d4cea916c62662e60ca0ca5 100644 (file)
--- 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"
index d632d7906608732a1059d197d7f06a62e1f55ed2..3bea3ef72f7eb0f867eac6a8ecd7467d1e878b82 100644 (file)
--- 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"
index 19405ec71ac5237738d4088ef718fddaccc02b21..0258f87d21fbe5fa6926c5b9c6be281b9f635893 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "commit.h"
 #include "gettext.h"
 #include "refs.h"
index 53f9d359ee8d0a5aa23ae9ac5fb3a524c9715c83..ff647d6c7b5a666f9bcdcbf9f4c21fbf92beb6ac 100644 (file)
@@ -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 0f369dbde7a092868a767d795911fb3a14168d70..cfced6f174a86900b473a22efd5ad29b3f42f601 100644 (file)
--- 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"
index 1a315ac13c91b7370c9a0ba31957691189f52441..eaba379e3ad570f1450190945aecd91e15ff320b 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "abspath.h"
+#include "advice.h"
 #include "alloc.h"
 #include "config.h"
 #include "environment.h"
index 11b38d16dcfa8e42227b52351942a5d3fc2ba5f5..82bf2496ba73374338ec8a0630545782fed81190 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "alloc.h"
 #include "config.h"
 #include "environment.h"
index d41489b4adb68f26a6141b7b86d41f08945b28ae..c6de2ca5a7edb7f7551cce5426d22bb4334476e5 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "strvec.h"
 #include "repository.h"
 #include "config.h"
index ccbfd9cc6de020e8a5fd329cd224d194d0acb5f2..47f223c0f8df0e173257df22c9704551ecf81eac 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "advice.h"
 #include "wt-status.h"
 #include "object.h"
 #include "dir.h"