Skip to content

Commit fc7bd51

Browse files
newrengitster
authored andcommitted
treewide: replace cache.h with more direct headers, where possible
Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cbeab74 commit fc7bd51

12 files changed

+30
-11
lines changed

advice.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
2+
#include "advice.h"
23
#include "config.h"
34
#include "color.h"
5+
#include "gettext.h"
46
#include "help.h"
57
#include "string-list.h"
68

decorate.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* decorate.c - decorate a git object with some arbitrary
33
* data.
44
*/
5-
#include "cache.h"
5+
#include "git-compat-util.h"
6+
#include "hashmap.h"
67
#include "object.h"
78
#include "decorate.h"
89

diffcore-order.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/*
22
* Copyright (C) 2005 Junio C Hamano
33
*/
4-
#include "cache.h"
4+
#include "git-compat-util.h"
5+
#include "gettext.h"
56
#include "diff.h"
67
#include "diffcore.h"
78

diffcore-rename.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
*
33
* Copyright (C) 2005 Junio C Hamano
44
*/
5-
#include "cache.h"
5+
#include "git-compat-util.h"
66
#include "alloc.h"
77
#include "diff.h"
88
#include "diffcore.h"
99
#include "object-store.h"
1010
#include "hashmap.h"
11+
#include "mem-pool.h"
12+
#include "oid-array.h"
1113
#include "progress.h"
1214
#include "promisor-remote.h"
15+
#include "string-list.h"
1316
#include "strmap.h"
17+
#include "trace2.h"
1418

1519
/* Table of rename/copy destinations */
1620

diffcore-rotate.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* Copyright (C) 2021, Google LLC.
33
* Based on diffcore-order.c, which is Copyright (C) 2005, Junio C Hamano
44
*/
5-
#include "cache.h"
5+
#include "git-compat-util.h"
6+
#include "gettext.h"
67
#include "diff.h"
78
#include "diffcore.h"
89

graph.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
2+
#include "gettext.h"
23
#include "config.h"
34
#include "commit.h"
45
#include "color.h"

hook.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
2+
#include "advice.h"
3+
#include "gettext.h"
24
#include "hook.h"
35
#include "run-command.h"
46
#include "config.h"
7+
#include "strbuf.h"
58

69
const char *find_hook(const char *name)
710
{

quote.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "cache.h"
22
#include "alloc.h"
33
#include "quote.h"
4+
#include "strbuf.h"
45
#include "strvec.h"
56

67
int quote_path_fully = 1;

sha1dc_git.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
2+
#include "sha1dc_git.h"
23
#include "hex.h"
34

45
#ifdef DC_SHA1_EXTERNAL

unix-socket.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
2+
#include "strbuf.h"
23
#include "unix-socket.h"
34

45
#define DEFAULT_UNIX_STREAM_LISTEN_BACKLOG (5)

url.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
22
#include "hex.h"
3+
#include "strbuf.h"
34
#include "url.h"
45

56
int is_urlschemechar(int first_flag, int ch)

urlmatch.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
#include "cache.h"
1+
#include "git-compat-util.h"
2+
#include "gettext.h"
23
#include "hex.h"
4+
#include "strbuf.h"
35
#include "urlmatch.h"
46

57
#define URL_ALPHA "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

0 commit comments

Comments
 (0)