Skip to content

Commit b2141fc

Browse files
bmwillgitster
authored andcommitted
config: don't include config.h by default
Stop including config.h by default in cache.h. Instead only include config.h in those files which require use of the config system. Signed-off-by: Brandon Williams <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f1c985d commit b2141fc

File tree

146 files changed

+145
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+145
-1
lines changed

advice.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cache.h"
2+
#include "config.h"
23

34
int advice_push_update_rejected = 1;
45
int advice_push_non_ff_current = 1;

alias.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cache.h"
2+
#include "config.h"
23

34
struct config_alias_data {
45
const char *alias;

apply.c

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
#include "cache.h"
11+
#include "config.h"
1112
#include "blob.h"
1213
#include "delta.h"
1314
#include "diff.h"

archive-tar.c

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright (c) 2005, 2006 Rene Scharfe
33
*/
44
#include "cache.h"
5+
#include "config.h"
56
#include "tar.h"
67
#include "archive.h"
78
#include "streaming.h"

archive-zip.c

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright (c) 2006 Rene Scharfe
33
*/
44
#include "cache.h"
5+
#include "config.h"
56
#include "archive.h"
67
#include "streaming.h"
78
#include "utf8.h"

archive.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cache.h"
2+
#include "config.h"
23
#include "refs.h"
34
#include "commit.h"
45
#include "tree-walk.h"

attr.c

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#define NO_THE_INDEX_COMPATIBILITY_MACROS
1111
#include "cache.h"
12+
#include "config.h"
1213
#include "exec_cmd.h"
1314
#include "attr.h"
1415
#include "dir.h"

bisect.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cache.h"
2+
#include "config.h"
23
#include "commit.h"
34
#include "diff.h"
45
#include "revision.h"

branch.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "git-compat-util.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "branch.h"
45
#include "refs.h"
56
#include "remote.h"

builtin/add.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (C) 2006 Linus Torvalds
55
*/
66
#include "cache.h"
7+
#include "config.h"
78
#include "builtin.h"
89
#include "lockfile.h"
910
#include "dir.h"

builtin/am.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Based on git-am.sh by Junio C Hamano.
55
*/
66
#include "cache.h"
7+
#include "config.h"
78
#include "builtin.h"
89
#include "exec_cmd.h"
910
#include "parse-options.h"

builtin/blame.c

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "cache.h"
9+
#include "config.h"
910
#include "refs.h"
1011
#include "builtin.h"
1112
#include "blob.h"

builtin/branch.c

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "cache.h"
9+
#include "config.h"
910
#include "color.h"
1011
#include "refs.h"
1112
#include "commit.h"

builtin/cat-file.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (C) Linus Torvalds, 2005
55
*/
66
#include "cache.h"
7+
#include "config.h"
78
#include "builtin.h"
89
#include "parse-options.h"
910
#include "userdiff.h"

builtin/check-attr.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "attr.h"
45
#include "quote.h"
56
#include "parse-options.h"

builtin/check-ignore.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "dir.h"
45
#include "quote.h"
56
#include "pathspec.h"

builtin/check-mailmap.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "builtin.h"
2+
#include "config.h"
23
#include "mailmap.h"
34
#include "parse-options.h"
45
#include "string-list.h"

builtin/checkout-index.c

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
*/
77
#include "builtin.h"
8+
#include "config.h"
89
#include "lockfile.h"
910
#include "quote.h"
1011
#include "cache-tree.h"

builtin/checkout.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "builtin.h"
2+
#include "config.h"
23
#include "lockfile.h"
34
#include "parse-options.h"
45
#include "refs.h"

builtin/clean.c

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "builtin.h"
1010
#include "cache.h"
11+
#include "config.h"
1112
#include "dir.h"
1213
#include "parse-options.h"
1314
#include "string-list.h"

builtin/clone.c

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include "builtin.h"
12+
#include "config.h"
1213
#include "lockfile.h"
1314
#include "parse-options.h"
1415
#include "fetch-pack.h"

builtin/column.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "strbuf.h"
45
#include "parse-options.h"
56
#include "string-list.h"

builtin/commit-tree.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (C) Linus Torvalds, 2005
55
*/
66
#include "cache.h"
7+
#include "config.h"
78
#include "commit.h"
89
#include "tree.h"
910
#include "builtin.h"

builtin/commit.c

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "cache.h"
9+
#include "config.h"
910
#include "lockfile.h"
1011
#include "cache-tree.h"
1112
#include "color.h"

builtin/config.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "color.h"
45
#include "parse-options.h"
56
#include "urlmatch.h"

builtin/count-objects.c

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include "cache.h"
8+
#include "config.h"
89
#include "dir.h"
910
#include "builtin.h"
1011
#include "parse-options.h"

builtin/describe.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cache.h"
2+
#include "config.h"
23
#include "lockfile.h"
34
#include "commit.h"
45
#include "tag.h"

builtin/diff-files.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (C) Linus Torvalds, 2005
55
*/
66
#include "cache.h"
7+
#include "config.h"
78
#include "diff.h"
89
#include "commit.h"
910
#include "revision.h"

builtin/diff-index.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cache.h"
2+
#include "config.h"
23
#include "diff.h"
34
#include "commit.h"
45
#include "revision.h"

builtin/diff-tree.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cache.h"
2+
#include "config.h"
23
#include "diff.h"
34
#include "commit.h"
45
#include "log-tree.h"

builtin/diff.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (c) 2006 Junio C Hamano
55
*/
66
#include "cache.h"
7+
#include "config.h"
78
#include "lockfile.h"
89
#include "color.h"
910
#include "commit.h"

builtin/difftool.c

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Copyright (C) 2016 Johannes Schindelin
1313
*/
1414
#include "cache.h"
15+
#include "config.h"
1516
#include "builtin.h"
1617
#include "run-command.h"
1718
#include "exec_cmd.h"

builtin/fast-export.c

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
#include "builtin.h"
77
#include "cache.h"
8+
#include "config.h"
89
#include "refs.h"
910
#include "commit.h"
1011
#include "object.h"

builtin/fetch.c

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* "git fetch"
33
*/
44
#include "cache.h"
5+
#include "config.h"
56
#include "refs.h"
67
#include "commit.h"
78
#include "builtin.h"

builtin/fmt-merge-msg.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "refs.h"
45
#include "commit.h"
56
#include "diff.h"

builtin/for-each-ref.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "refs.h"
45
#include "object.h"
56
#include "parse-options.h"

builtin/fsck.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "commit.h"
45
#include "tree.h"
56
#include "blob.h"

builtin/gc.c

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include "builtin.h"
14+
#include "config.h"
1415
#include "tempfile.h"
1516
#include "lockfile.h"
1617
#include "parse-options.h"

builtin/grep.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (c) 2006 Junio C Hamano
55
*/
66
#include "cache.h"
7+
#include "config.h"
78
#include "blob.h"
89
#include "tree.h"
910
#include "commit.h"

builtin/hash-object.c

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Copyright (C) Junio C Hamano, 2005
66
*/
77
#include "builtin.h"
8+
#include "config.h"
89
#include "blob.h"
910
#include "quote.h"
1011
#include "parse-options.h"

builtin/help.c

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Builtin help command
33
*/
44
#include "cache.h"
5+
#include "config.h"
56
#include "builtin.h"
67
#include "exec_cmd.h"
78
#include "parse-options.h"

builtin/index-pack.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "builtin.h"
2+
#include "config.h"
23
#include "delta.h"
34
#include "pack.h"
45
#include "csum-file.h"

builtin/init-db.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (C) Linus Torvalds, 2005
55
*/
66
#include "cache.h"
7+
#include "config.h"
78
#include "refs.h"
89
#include "builtin.h"
910
#include "exec_cmd.h"

builtin/log.c

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* 2006 Junio Hamano
66
*/
77
#include "cache.h"
8+
#include "config.h"
89
#include "refs.h"
910
#include "color.h"
1011
#include "commit.h"

builtin/ls-files.c

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Copyright (C) Linus Torvalds, 2005
77
*/
88
#include "cache.h"
9+
#include "config.h"
910
#include "quote.h"
1011
#include "dir.h"
1112
#include "builtin.h"

builtin/ls-tree.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (C) Linus Torvalds, 2005
55
*/
66
#include "cache.h"
7+
#include "config.h"
78
#include "blob.h"
89
#include "tree.h"
910
#include "commit.h"

builtin/merge-base.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "commit.h"
45
#include "refs.h"
56
#include "diff.h"

builtin/merge-file.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "xdiff/xdiff.h"
45
#include "xdiff-interface.h"
56
#include "parse-options.h"

builtin/merge.c

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
#include "cache.h"
10+
#include "config.h"
1011
#include "parse-options.h"
1112
#include "builtin.h"
1213
#include "lockfile.h"

builtin/mv.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (C) 2006 Johannes Schindelin
55
*/
66
#include "builtin.h"
7+
#include "config.h"
78
#include "pathspec.h"
89
#include "lockfile.h"
910
#include "dir.h"

builtin/name-rev.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "commit.h"
45
#include "tag.h"
56
#include "refs.h"

builtin/notes.c

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
#include "cache.h"
11+
#include "config.h"
1112
#include "builtin.h"
1213
#include "notes.h"
1314
#include "blob.h"

builtin/pack-objects.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "builtin.h"
22
#include "cache.h"
3+
#include "config.h"
34
#include "attr.h"
45
#include "object.h"
56
#include "blob.h"

builtin/patch-id.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "builtin.h"
2+
#include "config.h"
23

34
static void flush_current_id(int patchlen, struct object_id *id, struct object_id *result)
45
{

0 commit comments

Comments
 (0)