Merge branch 'en/header-cleanup'
Code clean-up to clarify the rule that "git-compat-util.h" must be the first to be included. * en/header-cleanup: diff.h: remove unnecessary include of object.h Remove unnecessary includes of builtin.h treewide: replace cache.h with more direct headers, where possible replace-object.h: move read_replace_refs declaration from cache.h to here object-store.h: move struct object_info from cache.h dir.h: refactor to no longer need to include cache.h object.h: stop depending on cache.h; make cache.h depend on object.h ident.h: move ident-related declarations out of cache.h pretty.h: move has_non_ascii() declaration from commit.h cache.h: remove dependence on hex.h; make other files include it explicitly hex.h: move some hex-related declarations from cache.h hash.h: move some oid-related declarations from cache.h alloc.h: move ALLOC_GROW() functions from cache.h treewide: remove unnecessary cache.h includes in source files treewide: remove unnecessary cache.h includes treewide: remove unnecessary git-compat-util.h includes in headers treewide: ensure one of the appropriate headers is sourced first
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#include "git-compat-util.h"
|
||||
#include "cache.h"
|
||||
#include "bloom.h"
|
||||
#include "hex.h"
|
||||
#include "test-tool.h"
|
||||
#include "commit.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#define USE_THE_INDEX_VARIABLE
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "tree.h"
|
||||
#include "cache-tree.h"
|
||||
#include "parse-options.h"
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
|
||||
/*
|
||||
* Usage: test-tool crontab <file> -l|<input>
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
|
||||
static int rc;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#define USE_THE_INDEX_VARIABLE
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "tree.h"
|
||||
#include "cache-tree.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#define USE_THE_INDEX_VARIABLE
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "split-index.h"
|
||||
#include "ewah/ewok.h"
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "dir.h"
|
||||
#include "hex.h"
|
||||
|
||||
static int compare_untracked(const void *a_, const void *b_)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "git-compat-util.h"
|
||||
#include "object.h"
|
||||
#include "decorate.h"
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include "cache-tree.h"
|
||||
#include "commit.h"
|
||||
#include "hex.h"
|
||||
#include "lockfile.h"
|
||||
#include "merge-ort.h"
|
||||
#include "refs.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
|
||||
int cmd_hash_impl(int ac, const char **av, int algo)
|
||||
{
|
||||
|
@ -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}";
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "tree.h"
|
||||
|
||||
int cmd__match_trees(int ac, const char **av)
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "oid-array.h"
|
||||
|
||||
static int print_oid(const struct object_id *oid, void *data)
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "oidmap.h"
|
||||
#include "strbuf.h"
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "oidtree.h"
|
||||
|
||||
static enum cb_next print_oid(const struct object_id *oid, void *data)
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "git-compat-util.h"
|
||||
#include "test-tool.h"
|
||||
#include "hex.h"
|
||||
#include "strbuf.h"
|
||||
#include "object-store.h"
|
||||
#include "packfile.h"
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "test-tool.h"
|
||||
#include "repository.h"
|
||||
#include "object-store.h"
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "grep.h"
|
||||
|
||||
int cmd__pcre2_config(int argc, const char **argv)
|
||||
|
@ -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)
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "cache.h"
|
||||
#include "connect.h"
|
||||
#include "hex.h"
|
||||
#include "parse-options.h"
|
||||
#include "pkt-line.h"
|
||||
#include "sigchain.h"
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "alloc.h"
|
||||
#include "commit.h"
|
||||
#include "commit-reach.h"
|
||||
#include "config.h"
|
||||
#include "hex.h"
|
||||
#include "parse-options.h"
|
||||
#include "ref-filter.h"
|
||||
#include "string-list.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "midx.h"
|
||||
#include "repository.h"
|
||||
#include "object-store.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "hex.h"
|
||||
#include "refs.h"
|
||||
#include "worktree.h"
|
||||
#include "object-store.h"
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "commit-graph.h"
|
||||
#include "commit.h"
|
||||
#include "config.h"
|
||||
#include "hex.h"
|
||||
#include "object-store.h"
|
||||
#include "object.h"
|
||||
#include "repository.h"
|
||||
|
@ -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"
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "sigchain.h"
|
||||
|
||||
#define X(f) \
|
||||
|
@ -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)
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
#include "submodule-config.h"
|
||||
|
||||
static void die_usage(const char **argv, const char *msg)
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
|
||||
int cmd__wildmatch(int argc, const char **argv)
|
||||
{
|
||||
|
Reference in New Issue
Block a user