remove duplicate includes
The following command reports that some header files are included twice: $ git grep '#include' '*.c' | sort | uniq -cd Remove the second #include line in each case, as it has no effect. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Feb 8, 2026 at 13:32 UTC
10c68d2577b2c4eb4ca9b259a38a67444068e2d9
7 files changed
-7
builtin/blame.c
-1
@@ -10,7 +10,6 @@
10
#include "builtin.h"
11
#include "config.h"
12
#include "color.h"
13
-#include "builtin.h"
13
#include "environment.h"
14
#include "gettext.h"
15
#include "hex.h"
builtin/log.c
-1
@@ -24,7 +24,6 @@
24
#include "diff-merges.h"
25
#include "revision.h"
26
#include "log-tree.h"
27
-#include "builtin.h"
27
#include "oid-array.h"
28
#include "tag.h"
29
#include "reflog-walk.h"
builtin/pack-objects.c
-1
@@ -44,7 +44,6 @@
44
#include "blob.h"
45
#include "tree.h"
46
#include "path-walk.h"
47
-#include "trace2.h"
47
48
/*
49
* Objects we are going to pack are collected in the `to_pack` structure.
commit.c
-1
@@ -31,7 +31,6 @@
31
#include "parse.h"
32
#include "object-file.h"
33
#include "object-file-convert.h"
34
-#include "prio-queue.h"
34
35
static struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **);
36
object-file-convert.c
-1
@@ -6,7 +6,6 @@
6
#include "hex.h"
7
#include "repository.h"
8
#include "hash.h"
9
-#include "hash.h"
9
#include "object.h"
10
#include "loose.h"
11
#include "commit.h"
protocol-caps.c
-1
@@ -4,7 +4,6 @@
4
#include "hex.h"
5
#include "pkt-line.h"
6
#include "hash.h"
7
-#include "hex.h"
7
#include "object.h"
8
#include "odb.h"
9
#include "repository.h"
setup.c
-1
@@ -25,7 +25,6 @@
25
#include "trace.h"
26
#include "trace2.h"
27
#include "worktree.h"
28
-#include "exec-cmd.h"
28
29
static int inside_git_dir = -1;
30
static int inside_work_tree = -1;