treewide: replace cache.h with more direct headers, where possible
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Feb 24, 2023 at 00:09 UTC
fc7bd51b06424694c2e3dd97c11fa095d84d52b1
12 files changed
+30
-11
advice.c
+3
-1
@@ -1,6 +1,8 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
+#include "advice.h"
3
#include "config.h"
4
#include "color.h"
5
+#include "gettext.h"
6
#include "help.h"
7
#include "string-list.h"
8
decorate.c
+2
-1
@@ -2,7 +2,8 @@
2
* decorate.c - decorate a git object with some arbitrary
3
* data.
4
*/
5
-#include "cache.h"
5
+#include "git-compat-util.h"
6
+#include "hashmap.h"
7
#include "object.h"
8
#include "decorate.h"
9
diffcore-order.c
+2
-1
@@ -1,7 +1,8 @@
1
/*
2
* Copyright (C) 2005 Junio C Hamano
3
*/
4
-#include "cache.h"
4
+#include "git-compat-util.h"
5
+#include "gettext.h"
6
#include "diff.h"
7
#include "diffcore.h"
8
diffcore-rename.c
+5
-1
@@ -2,15 +2,19 @@
2
*
3
* Copyright (C) 2005 Junio C Hamano
4
*/
5
-#include "cache.h"
5
+#include "git-compat-util.h"
6
#include "alloc.h"
7
#include "diff.h"
8
#include "diffcore.h"
9
#include "object-store.h"
10
#include "hashmap.h"
11
+#include "mem-pool.h"
12
+#include "oid-array.h"
13
#include "progress.h"
14
#include "promisor-remote.h"
15
+#include "string-list.h"
16
#include "strmap.h"
17
+#include "trace2.h"
18
19
/* Table of rename/copy destinations */
20
diffcore-rotate.c
+2
-1
@@ -2,7 +2,8 @@
2
* Copyright (C) 2021, Google LLC.
3
* Based on diffcore-order.c, which is Copyright (C) 2005, Junio C Hamano
4
*/
5
-#include "cache.h"
5
+#include "git-compat-util.h"
6
+#include "gettext.h"
7
#include "diff.h"
8
#include "diffcore.h"
9
graph.c
+2
-1
@@ -1,4 +1,5 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
+#include "gettext.h"
3
#include "config.h"
4
#include "commit.h"
5
#include "color.h"
hook.c
+4
-1
@@ -1,7 +1,10 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
+#include "advice.h"
3
+#include "gettext.h"
4
#include "hook.h"
5
#include "run-command.h"
6
#include "config.h"
7
+#include "strbuf.h"
8
9
const char *find_hook(const char *name)
10
{
quote.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "alloc.h"
3
#include "quote.h"
4
+#include "strbuf.h"
5
#include "strvec.h"
6
7
int quote_path_fully = 1;
sha1dc_git.c
+2
-1
@@ -1,4 +1,5 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
+#include "sha1dc_git.h"
3
#include "hex.h"
4
5
#ifdef DC_SHA1_EXTERNAL
unix-socket.c
+2
-1
@@ -1,4 +1,5 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
+#include "strbuf.h"
3
#include "unix-socket.h"
4
5
#define DEFAULT_UNIX_STREAM_LISTEN_BACKLOG (5)
url.c
+2
-1
@@ -1,5 +1,6 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "hex.h"
3
+#include "strbuf.h"
4
#include "url.h"
5
6
int is_urlschemechar(int first_flag, int ch)
urlmatch.c
+3
-1
@@ -1,5 +1,7 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
+#include "gettext.h"
3
#include "hex.h"
4
+#include "strbuf.h"
5
#include "urlmatch.h"
6
7
#define URL_ALPHA "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"