treewide: remove unnecessary cache.h inclusion

Several files were including cache.h solely to get other headers, such as trace.h and trace2.h. Since the last few commits have modified files to make these dependencies more explicit, the inclusion of cache.h is no longer needed in several cases. Remove 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>

Elijah Newren committed Apr 11, 2023 at 00:41 UTC 5579f44d2fb37e1126e71870b208d93e93e510ac
10 files changed +8 -10
compat/simple-ipc/ipc-unix-socket.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "cache.h"
1 +#include "git-compat-util.h"
2 #include "gettext.h"
3 #include "simple-ipc.h"
4 #include "strbuf.h"
connect.c
-1
@@ -1,5 +1,4 @@
1 #include "git-compat-util.h"
2 -#include "cache.h"
2 #include "config.h"
3 #include "environment.h"
4 #include "gettext.h"
fetch-pack.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "cache.h"
1 +#include "git-compat-util.h"
2 #include "alloc.h"
3 #include "repository.h"
4 #include "config.h"
pack-write.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "cache.h"
1 +#include "git-compat-util.h"
2 #include "environment.h"
3 #include "gettext.h"
4 #include "hex.h"
promisor-remote.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "cache.h"
1 +#include "git-compat-util.h"
2 #include "gettext.h"
3 #include "hex.h"
4 #include "object-store.h"
protocol.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "cache.h"
1 +#include "git-compat-util.h"
2 #include "config.h"
3 #include "environment.h"
4 #include "protocol.h"
scalar.c
+1 -1
@@ -2,7 +2,7 @@
2 * The Scalar command-line interface.
3 */
4
5 -#include "cache.h"
5 +#include "git-compat-util.h"
6 #include "abspath.h"
7 #include "gettext.h"
8 #include "parse-options.h"
t/helper/test-date.c
-1
@@ -1,5 +1,4 @@
1 #include "test-tool.h"
2 -#include "cache.h"
2 #include "date.h"
3 #include "trace.h"
4
trace.c
+1 -1
@@ -21,7 +21,7 @@
21 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 */
23
24 -#include "cache.h"
24 +#include "git-compat-util.h"
25 #include "abspath.h"
26 #include "environment.h"
27 #include "quote.h"
upload-pack.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "cache.h"
1 +#include "git-compat-util.h"
2 #include "config.h"
3 #include "environment.h"
4 #include "gettext.h"