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 <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Elijah Newren 2023-03-21 06:25:56 +00:00 committed by Junio C Hamano
parent 553d4d70d1
commit 4f6728d52d
13 changed files with 12 additions and 13 deletions

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "strbuf.h" #include "strbuf.h"
#include "strvec.h" #include "strvec.h"

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "simple-ipc.h" #include "simple-ipc.h"
#include "strbuf.h" #include "strbuf.h"
#include "pkt-line.h" #include "pkt-line.h"

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "gettext.h" #include "gettext.h"
#include "hex.h" #include "hex.h"
#include "object-store.h" #include "object-store.h"

2
grep.c
View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "config.h" #include "config.h"
#include "gettext.h" #include "gettext.h"
#include "grep.h" #include "grep.h"

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "default.h" #include "default.h"
#include "../commit.h" #include "../commit.h"
#include "../fetch-negotiator.h" #include "../fetch-negotiator.h"

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "skipping.h" #include "skipping.h"
#include "../commit.h" #include "../commit.h"
#include "../fetch-negotiator.h" #include "../fetch-negotiator.h"

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "notes-cache.h" #include "notes-cache.h"
#include "object-store.h" #include "object-store.h"
#include "repository.h" #include "repository.h"

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "diff.h" #include "diff.h"
#include "commit.h" #include "commit.h"
#include "hash-lookup.h" #include "hash-lookup.h"

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "gettext.h" #include "gettext.h"
#include "object-store.h" #include "object-store.h"
#include "reflog.h" #include "reflog.h"

View File

@ -3,7 +3,7 @@
* documentation about the design and use of reference iterators. * documentation about the design and use of reference iterators.
*/ */
#include "cache.h" #include "git-compat-util.h"
#include "refs.h" #include "refs.h"
#include "refs/refs-internal.h" #include "refs/refs-internal.h"
#include "iterator.h" #include "iterator.h"

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "gettext.h" #include "gettext.h"
#include "hex.h" #include "hex.h"
#include "oidmap.h" #include "oidmap.h"

View File

@ -1,5 +1,4 @@
#include "test-tool.h" #include "test-tool.h"
#include "cache.h"
#include "hex.h" #include "hex.h"
int cmd_hash_impl(int ac, const char **av, int algo) int cmd_hash_impl(int ac, const char **av, int algo)

View File

@ -1,4 +1,4 @@
#include "cache.h" #include "git-compat-util.h"
#include "config.h" #include "config.h"
#include "hex.h" #include "hex.h"
#include "object-store.h" #include "object-store.h"