Skip to content

Commit eea0e59

Browse files
newrengitster
authored andcommitted
treewide: remove unnecessary includes in source files
Each of these were checked with gcc -E -I. ${SOURCE_FILE} | grep ${HEADER_FILE} to ensure that removing the direct inclusion of the header actually resulted in that header no longer being included at all (i.e. that no other header pulled it in transitively). ...except for a few cases where we verified that although the header was brought in transitively, nothing from it was directly used in that source file. These cases were: * builtin/credential-cache.c * builtin/pull.c * builtin/send-pack.c Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 147438e commit eea0e59

File tree

158 files changed

+0
-293
lines changed

Some content is hidden

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

158 files changed

+0
-293
lines changed

add-patch.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "strvec.h"
1313
#include "pathspec.h"
1414
#include "color.h"
15-
#include "diff.h"
1615
#include "compat/terminal.h"
1716
#include "prompt.h"
1817

apply.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "base85.h"
1313
#include "config.h"
1414
#include "object-store-ll.h"
15-
#include "blob.h"
1615
#include "delta.h"
1716
#include "diff.h"
1817
#include "dir.h"

archive.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "archive.h"
1818
#include "parse-options.h"
1919
#include "unpack-trees.h"
20-
#include "dir.h"
2120
#include "quote.h"
2221

2322
static char const * const archive_usage[] = {

bisect.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "refs.h"
1010
#include "list-objects.h"
1111
#include "quote.h"
12-
#include "hash-lookup.h"
1312
#include "run-command.h"
1413
#include "log-tree.h"
1514
#include "bisect.h"

blob.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "git-compat-util.h"
22
#include "blob.h"
3-
#include "repository.h"
43
#include "alloc.h"
54

65
const char *blob_type = "blob";

bloom.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "bloom.h"
33
#include "diff.h"
44
#include "diffcore.h"
5-
#include "revision.h"
65
#include "hashmap.h"
76
#include "commit-graph.h"
87
#include "commit.h"

builtin/add.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212
#include "dir.h"
1313
#include "gettext.h"
1414
#include "pathspec.h"
15-
#include "exec-cmd.h"
16-
#include "cache-tree.h"
1715
#include "run-command.h"
1816
#include "parse-options.h"
1917
#include "path.h"
2018
#include "preload-index.h"
2119
#include "diff.h"
22-
#include "diffcore.h"
2320
#include "read-cache.h"
2421
#include "repository.h"
2522
#include "revision.h"

builtin/am.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "config.h"
1111
#include "editor.h"
1212
#include "environment.h"
13-
#include "exec-cmd.h"
1413
#include "gettext.h"
1514
#include "hex.h"
1615
#include "parse-options.h"
@@ -24,7 +23,6 @@
2423
#include "refs.h"
2524
#include "commit.h"
2625
#include "diff.h"
27-
#include "diffcore.h"
2826
#include "unpack-trees.h"
2927
#include "branch.h"
3028
#include "object-name.h"
@@ -35,11 +33,9 @@
3533
#include "log-tree.h"
3634
#include "notes-utils.h"
3735
#include "rerere.h"
38-
#include "prompt.h"
3936
#include "mailinfo.h"
4037
#include "apply.h"
4138
#include "string-list.h"
42-
#include "packfile.h"
4339
#include "pager.h"
4440
#include "path.h"
4541
#include "repository.h"

builtin/apply.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "builtin.h"
22
#include "gettext.h"
3-
#include "parse-options.h"
43
#include "repository.h"
54
#include "apply.h"
65

builtin/bisect.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include "parse-options.h"
88
#include "bisect.h"
99
#include "refs.h"
10-
#include "dir.h"
1110
#include "strvec.h"
1211
#include "run-command.h"
1312
#include "oid-array.h"

0 commit comments

Comments
 (0)