Skip to content

Commit 15db4e7

Browse files
newrengitster
authored andcommitted
treewide: remove unnecessary cache.h includes in source files
We had several C files include cache.h unnecessarily. Replace those with an include of "git-compat-util.h" instead. Much like the previous commit, these have all been verified via both ensuring that gcc -E $SOURCE_FILE | grep '"cache.h"' found no hits and that make DEVELOPER=1 ${OBJECT_FILE_FOR_SOURCE_FILE} successfully compiles without warnings. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ba3d1c7 commit 15db4e7

29 files changed

+25
-30
lines changed

hashmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Generic implementation of hash-based key value mappings.
33
*/
4-
#include "cache.h"
4+
#include "git-compat-util.h"
55
#include "hashmap.h"
66

77
#define FNV32_BASE ((unsigned int) 0x811c9dc5)

imap-send.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* along with this program; if not, see <http://www.gnu.org/licenses/>.
2222
*/
2323

24-
#include "cache.h"
24+
#include "git-compat-util.h"
2525
#include "config.h"
2626
#include "credential.h"
2727
#include "exec-cmd.h"

json-writer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
22
#include "json-writer.h"
33

44
void jw_init(struct json_writer *jw)

kwset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
String Matching: An Aid to Bibliographic Search," CACM June 1975,
3333
Vol. 18, No. 6, which describes the failure function used below. */
3434

35-
#include "cache.h"
35+
#include "git-compat-util.h"
3636

3737
#include "kwset.h"
3838
#include "compat/obstack.h"

levenshtein.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
22
#include "levenshtein.h"
33

44
/*

linear-assignment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* algorithm for dense and sparse linear assignment problems</i>. Computing,
44
* 38(4), 325-340.
55
*/
6-
#include "cache.h"
6+
#include "git-compat-util.h"
77
#include "linear-assignment.h"
88

99
#define COST(column, row) cost[(column) + column_count * (row)]

mem-pool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Memory Pool implementation logic.
33
*/
44

5-
#include "cache.h"
5+
#include "git-compat-util.h"
66
#include "mem-pool.h"
77

88
#define BLOCK_GROWTH_SIZE (1024 * 1024 - sizeof(struct mp_block))

oidmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
22
#include "oidmap.h"
33

44
static int oidmap_neq(const void *hashmap_cmp_fn_data UNUSED,

repo-settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
22
#include "config.h"
33
#include "repository.h"
44
#include "midx.h"

serve.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
22
#include "repository.h"
33
#include "config.h"
44
#include "pkt-line.h"
@@ -8,6 +8,7 @@
88
#include "serve.h"
99
#include "upload-pack.h"
1010
#include "bundle-uri.h"
11+
#include "trace2.h"
1112

1213
static int advertise_sid = -1;
1314
static int client_hash_algo = GIT_HASH_SHA1;

0 commit comments

Comments
 (0)