1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-25 12:35:11 +02:00

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>
This commit is contained in:
Elijah Newren 2023-02-24 00:09:23 +00:00 committed by Junio C Hamano
parent ba3d1c73da
commit 15db4e7f4a
29 changed files with 25 additions and 30 deletions

View File

@ -1,7 +1,7 @@
/*
* Generic implementation of hash-based key value mappings.
*/
#include "cache.h"
#include "git-compat-util.h"
#include "hashmap.h"
#define FNV32_BASE ((unsigned int) 0x811c9dc5)

View File

@ -21,7 +21,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "cache.h"
#include "git-compat-util.h"
#include "config.h"
#include "credential.h"
#include "exec-cmd.h"

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "json-writer.h"
void jw_init(struct json_writer *jw)

View File

@ -32,7 +32,7 @@
String Matching: An Aid to Bibliographic Search," CACM June 1975,
Vol. 18, No. 6, which describes the failure function used below. */
#include "cache.h"
#include "git-compat-util.h"
#include "kwset.h"
#include "compat/obstack.h"

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "levenshtein.h"
/*

View File

@ -3,7 +3,7 @@
* algorithm for dense and sparse linear assignment problems</i>. Computing,
* 38(4), 325-340.
*/
#include "cache.h"
#include "git-compat-util.h"
#include "linear-assignment.h"
#define COST(column, row) cost[(column) + column_count * (row)]

View File

@ -2,7 +2,7 @@
* Memory Pool implementation logic.
*/
#include "cache.h"
#include "git-compat-util.h"
#include "mem-pool.h"
#define BLOCK_GROWTH_SIZE (1024 * 1024 - sizeof(struct mp_block))

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "oidmap.h"
static int oidmap_neq(const void *hashmap_cmp_fn_data UNUSED,

View File

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

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "repository.h"
#include "config.h"
#include "pkt-line.h"
@ -8,6 +8,7 @@
#include "serve.h"
#include "upload-pack.h"
#include "bundle-uri.h"
#include "trace2.h"
static int advertise_sid = -1;
static int client_hash_algo = GIT_HASH_SHA1;

View File

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

View File

@ -1,5 +1,4 @@
#include "test-tool.h"
#include "cache.h"
/*
* Usage: test-tool crontab <file> -l|<input>

View File

@ -1,5 +1,4 @@
#include "test-tool.h"
#include "cache.h"
static int rc;

View File

@ -1,5 +1,4 @@
#include "test-tool.h"
#include "cache.h"
#include "json-writer.h"
static const char *expect_obj1 = "{\"a\":\"abc\",\"b\":42,\"c\":true}";

View File

@ -1,5 +1,4 @@
#include "test-tool.h"
#include "cache.h"
#include "grep.h"
int cmd__pcre2_config(int argc, const char **argv)

View File

@ -1,5 +1,4 @@
#include "test-tool.h"
#include "cache.h"
#include "prio-queue.h"
static int intcmp(const void *va, const void *vb, void *data)

View File

@ -9,8 +9,6 @@
*/
#include "test-tool.h"
#include "git-compat-util.h"
#include "cache.h"
#include "run-command.h"
#include "strvec.h"
#include "strbuf.h"

View File

@ -1,5 +1,4 @@
#include "test-tool.h"
#include "cache.h"
#include "sigchain.h"
#define X(f) \

View File

@ -3,13 +3,14 @@
*/
#include "test-tool.h"
#include "cache.h"
#include "gettext.h"
#include "strbuf.h"
#include "simple-ipc.h"
#include "parse-options.h"
#include "thread-utils.h"
#include "strvec.h"
#include "run-command.h"
#include "trace2.h"
#ifndef SUPPORTS_SIMPLE_IPC
int cmd__simple_ipc(int argc, const char **argv)

View File

@ -1,5 +1,4 @@
#include "test-tool.h"
#include "cache.h"
int cmd__wildmatch(int argc, const char **argv)
{

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "thread-utils.h"
#if defined(hpux) || defined(__hpux) || defined(_hpux)

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "config.h"
#include "json-writer.h"
#include "quote.h"
@ -6,6 +6,7 @@
#include "sigchain.h"
#include "thread-utils.h"
#include "version.h"
#include "trace.h"
#include "trace2/tr2_cfg.h"
#include "trace2/tr2_cmd_name.h"
#include "trace2/tr2_ctr.h"

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "thread-utils.h"
#include "trace2/tr2_tgt.h"
#include "trace2/tr2_tls.h"

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "tr2_tbuf.h"
void tr2_tbuf_local_time(struct tr2_tbuf *tb)

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "config.h"
#include "json-writer.h"
#include "run-command.h"

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "config.h"
#include "run-command.h"
#include "quote.h"

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "config.h"
#include "run-command.h"
#include "quote.h"

View File

@ -1,8 +1,9 @@
#include "cache.h"
#include "git-compat-util.h"
#include "thread-utils.h"
#include "trace2/tr2_tgt.h"
#include "trace2/tr2_tls.h"
#include "trace2/tr2_tmr.h"
#include "trace.h"
#define MY_MAX(a, b) ((a) > (b) ? (a) : (b))
#define MY_MIN(a, b) ((a) < (b) ? (a) : (b))

View File

@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "lockfile.h"
#include "unix-socket.h"
#include "unix-stream-server.h"