Skip to content

Commit 4f6728d

Browse files
newrengitster
authored andcommitted
treewide: remove unnecessary cache.h inclusion from several sources
A number of files were apparently including cache.h solely to get gettext.h. By making those files explicitly include gettext.h, we can already drop the include of cache.h in these files. On top of that, there were some files using cache.h that didn't need to for any reason. Remove these unnecessary includes. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 553d4d7 commit 4f6728d

File tree

13 files changed

+12
-13
lines changed

13 files changed

+12
-13
lines changed

compat/linux/procinfo.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

33
#include "strbuf.h"
44
#include "strvec.h"

compat/simple-ipc/ipc-shared.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 "simple-ipc.h"
33
#include "strbuf.h"
44
#include "pkt-line.h"

connected.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 "gettext.h"
33
#include "hex.h"
44
#include "object-store.h"

grep.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 "gettext.h"
44
#include "grep.h"

negotiator/default.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 "default.h"
33
#include "../commit.h"
44
#include "../fetch-negotiator.h"

negotiator/skipping.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 "skipping.h"
33
#include "../commit.h"
44
#include "../fetch-negotiator.h"

notes-cache.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 "notes-cache.h"
33
#include "object-store.h"
44
#include "repository.h"

patch-ids.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 "diff.h"
33
#include "commit.h"
44
#include "hash-lookup.h"

reflog.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 "gettext.h"
33
#include "object-store.h"
44
#include "reflog.h"

refs/iterator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* documentation about the design and use of reference iterators.
44
*/
55

6-
#include "cache.h"
6+
#include "git-compat-util.h"
77
#include "refs.h"
88
#include "refs/refs-internal.h"
99
#include "iterator.h"

0 commit comments

Comments
 (0)