csum-file.h: remove unnecessary inclusion of cache.h

With the change in the last commit to move several functions to write-or-die.h, csum-file.h no longer needs to include cache.h. However, removing that include forces several other C files, which directly or indirectly dependend upon csum-file.h's inclusion of cache.h, to now be more explicit about their dependencies. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Mar 21, 2023 at 06:26 UTC ec2f02696157d3781fbfd410f0017c49cc1eda01
12 files changed +13 -10
bulk-checkin.c
+1 -1
@@ -1,7 +1,7 @@
1 /*
2 * Copyright (c) 2011, Google Inc.
3 */
4 -#include "git-compat-util.h"
4 +#include "cache.h"
5 #include "alloc.h"
6 #include "bulk-checkin.h"
7 #include "environment.h"
chunk-format.c
+1
@@ -3,6 +3,7 @@
3 #include "chunk-format.h"
4 #include "csum-file.h"
5 #include "gettext.h"
6 +#include "trace2.h"
7
8 /*
9 * When writing a chunk-based file format, collect the chunks in
commit-graph.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "git-compat-util.h"
1 +#include "cache.h"
2 #include "config.h"
3 #include "gettext.h"
4 #include "hex.h"
csum-file.h
-1
@@ -1,7 +1,6 @@
1 #ifndef CSUM_FILE_H
2 #define CSUM_FILE_H
3
4 -#include "cache.h"
4 #include "hash.h"
5 #include "write-or-die.h"
6
delta-islands.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "git-compat-util.h"
1 +#include "cache.h"
2 #include "alloc.h"
3 #include "attr.h"
4 #include "object.h"
fetch-pack.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "git-compat-util.h"
1 +#include "cache.h"
2 #include "alloc.h"
3 #include "repository.h"
4 #include "config.h"
midx.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "git-compat-util.h"
1 +#include "cache.h"
2 #include "abspath.h"
3 #include "alloc.h"
4 #include "config.h"
object-file.c
+1 -1
@@ -6,7 +6,7 @@
6 * This handles basic git object files - packing, unpacking,
7 * creation etc.
8 */
9 -#include "git-compat-util.h"
9 +#include "cache.h"
10 #include "abspath.h"
11 #include "alloc.h"
12 #include "config.h"
pack-bitmap-write.c
+2 -1
@@ -1,4 +1,4 @@
1 -#include "git-compat-util.h"
1 +#include "cache.h"
2 #include "alloc.h"
3 #include "environment.h"
4 #include "gettext.h"
@@ -17,6 +17,7 @@
17 #include "pack-objects.h"
18 #include "commit-reach.h"
19 #include "prio-queue.h"
20 +#include "trace2.h"
21
22 struct bitmapped_commit {
23 struct commit *commit;
pack-bitmap.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "git-compat-util.h"
1 +#include "cache.h"
2 #include "alloc.h"
3 #include "commit.h"
4 #include "gettext.h"
pack.h
+2
@@ -4,6 +4,8 @@
4 #include "object.h"
5 #include "csum-file.h"
6
7 +struct packed_git;
8 +struct pack_window;
9 struct repository;
10
11 /*
packfile.c
+1 -1
@@ -1,4 +1,4 @@
1 -#include "git-compat-util.h"
1 +#include "cache.h"
2 #include "alloc.h"
3 #include "environment.h"
4 #include "gettext.h"