Git fork

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 <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Elijah Newren and committed by
Junio C Hamano
15db4e7f ba3d1c73

+25 -30
+1 -1
hashmap.c
··· 1 1 /* 2 2 * Generic implementation of hash-based key value mappings. 3 3 */ 4 - #include "cache.h" 4 + #include "git-compat-util.h" 5 5 #include "hashmap.h" 6 6 7 7 #define FNV32_BASE ((unsigned int) 0x811c9dc5)
+1 -1
imap-send.c
··· 21 21 * along with this program; if not, see <http://www.gnu.org/licenses/>. 22 22 */ 23 23 24 - #include "cache.h" 24 + #include "git-compat-util.h" 25 25 #include "config.h" 26 26 #include "credential.h" 27 27 #include "exec-cmd.h"
+1 -1
json-writer.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "json-writer.h" 3 3 4 4 void jw_init(struct json_writer *jw)
+1 -1
kwset.c
··· 32 32 String Matching: An Aid to Bibliographic Search," CACM June 1975, 33 33 Vol. 18, No. 6, which describes the failure function used below. */ 34 34 35 - #include "cache.h" 35 + #include "git-compat-util.h" 36 36 37 37 #include "kwset.h" 38 38 #include "compat/obstack.h"
+1 -1
levenshtein.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "levenshtein.h" 3 3 4 4 /*
+1 -1
linear-assignment.c
··· 3 3 * algorithm for dense and sparse linear assignment problems</i>. Computing, 4 4 * 38(4), 325-340. 5 5 */ 6 - #include "cache.h" 6 + #include "git-compat-util.h" 7 7 #include "linear-assignment.h" 8 8 9 9 #define COST(column, row) cost[(column) + column_count * (row)]
+1 -1
mem-pool.c
··· 2 2 * Memory Pool implementation logic. 3 3 */ 4 4 5 - #include "cache.h" 5 + #include "git-compat-util.h" 6 6 #include "mem-pool.h" 7 7 8 8 #define BLOCK_GROWTH_SIZE (1024 * 1024 - sizeof(struct mp_block))
+1 -1
oidmap.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "oidmap.h" 3 3 4 4 static int oidmap_neq(const void *hashmap_cmp_fn_data UNUSED,
+1 -1
repo-settings.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "config.h" 3 3 #include "repository.h" 4 4 #include "midx.h"
+2 -1
serve.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "repository.h" 3 3 #include "config.h" 4 4 #include "pkt-line.h" ··· 8 8 #include "serve.h" 9 9 #include "upload-pack.h" 10 10 #include "bundle-uri.h" 11 + #include "trace2.h" 11 12 12 13 static int advertise_sid = -1; 13 14 static int client_hash_algo = GIT_HASH_SHA1;
+1 -1
shell.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "quote.h" 3 3 #include "exec-cmd.h" 4 4 #include "strbuf.h"
-1
t/helper/test-crontab.c
··· 1 1 #include "test-tool.h" 2 - #include "cache.h" 3 2 4 3 /* 5 4 * Usage: test-tool crontab <file> -l|<input>
-1
t/helper/test-ctype.c
··· 1 1 #include "test-tool.h" 2 - #include "cache.h" 3 2 4 3 static int rc; 5 4
-1
t/helper/test-json-writer.c
··· 1 1 #include "test-tool.h" 2 - #include "cache.h" 3 2 #include "json-writer.h" 4 3 5 4 static const char *expect_obj1 = "{\"a\":\"abc\",\"b\":42,\"c\":true}";
-1
t/helper/test-pcre2-config.c
··· 1 1 #include "test-tool.h" 2 - #include "cache.h" 3 2 #include "grep.h" 4 3 5 4 int cmd__pcre2_config(int argc, const char **argv)
-1
t/helper/test-prio-queue.c
··· 1 1 #include "test-tool.h" 2 - #include "cache.h" 3 2 #include "prio-queue.h" 4 3 5 4 static int intcmp(const void *va, const void *vb, void *data)
-2
t/helper/test-run-command.c
··· 9 9 */ 10 10 11 11 #include "test-tool.h" 12 - #include "git-compat-util.h" 13 - #include "cache.h" 14 12 #include "run-command.h" 15 13 #include "strvec.h" 16 14 #include "strbuf.h"
-1
t/helper/test-sigchain.c
··· 1 1 #include "test-tool.h" 2 - #include "cache.h" 3 2 #include "sigchain.h" 4 3 5 4 #define X(f) \
+2 -1
t/helper/test-simple-ipc.c
··· 3 3 */ 4 4 5 5 #include "test-tool.h" 6 - #include "cache.h" 6 + #include "gettext.h" 7 7 #include "strbuf.h" 8 8 #include "simple-ipc.h" 9 9 #include "parse-options.h" 10 10 #include "thread-utils.h" 11 11 #include "strvec.h" 12 12 #include "run-command.h" 13 + #include "trace2.h" 13 14 14 15 #ifndef SUPPORTS_SIMPLE_IPC 15 16 int cmd__simple_ipc(int argc, const char **argv)
-1
t/helper/test-wildmatch.c
··· 1 1 #include "test-tool.h" 2 - #include "cache.h" 3 2 4 3 int cmd__wildmatch(int argc, const char **argv) 5 4 {
+1 -1
thread-utils.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "thread-utils.h" 3 3 4 4 #if defined(hpux) || defined(__hpux) || defined(_hpux)
+2 -1
trace2.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "config.h" 3 3 #include "json-writer.h" 4 4 #include "quote.h" ··· 6 6 #include "sigchain.h" 7 7 #include "thread-utils.h" 8 8 #include "version.h" 9 + #include "trace.h" 9 10 #include "trace2/tr2_cfg.h" 10 11 #include "trace2/tr2_cmd_name.h" 11 12 #include "trace2/tr2_ctr.h"
+1 -1
trace2/tr2_ctr.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "thread-utils.h" 3 3 #include "trace2/tr2_tgt.h" 4 4 #include "trace2/tr2_tls.h"
+1 -1
trace2/tr2_tbuf.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "tr2_tbuf.h" 3 3 4 4 void tr2_tbuf_local_time(struct tr2_tbuf *tb)
+1 -1
trace2/tr2_tgt_event.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "config.h" 3 3 #include "json-writer.h" 4 4 #include "run-command.h"
+1 -1
trace2/tr2_tgt_normal.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "config.h" 3 3 #include "run-command.h" 4 4 #include "quote.h"
+1 -1
trace2/tr2_tgt_perf.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "config.h" 3 3 #include "run-command.h" 4 4 #include "quote.h"
+2 -1
trace2/tr2_tmr.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "thread-utils.h" 3 3 #include "trace2/tr2_tgt.h" 4 4 #include "trace2/tr2_tls.h" 5 5 #include "trace2/tr2_tmr.h" 6 + #include "trace.h" 6 7 7 8 #define MY_MAX(a, b) ((a) > (b) ? (a) : (b)) 8 9 #define MY_MIN(a, b) ((a) < (b) ? (a) : (b))
+1 -1
unix-stream-server.c
··· 1 - #include "cache.h" 1 + #include "git-compat-util.h" 2 2 #include "lockfile.h" 3 3 #include "unix-socket.h" 4 4 #include "unix-stream-server.h"