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
index 6044973462..6588161382 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -10,7 +10,6 @@
#include "builtin.h"
#include "config.h"
#include "color.h"
-#include "builtin.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
builtin/log.c
-1
index 5c9a8ef363..43af5047e3 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -24,7 +24,6 @@
#include "diff-merges.h"
#include "revision.h"
#include "log-tree.h"
-#include "builtin.h"
#include "oid-array.h"
#include "tag.h"
#include "reflog-walk.h"
builtin/pack-objects.c
-1
index 5846b6a293..9768c7bf0b 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -44,7 +44,6 @@
#include "blob.h"
#include "tree.h"
#include "path-walk.h"
-#include "trace2.h"
/*
* Objects we are going to pack are collected in the `to_pack` structure.
commit.c
-1
index 28bb5ce029..515d77e7d3 100644
--- a/commit.c
+++ b/commit.c
@@ -31,7 +31,6 @@
#include "parse.h"
#include "object-file.h"
#include "object-file-convert.h"
-#include "prio-queue.h"
static struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **);
object-file-convert.c
-1
index 7ab875afe6..7813286596 100644
--- a/object-file-convert.c
+++ b/object-file-convert.c
@@ -6,7 +6,6 @@
#include "hex.h"
#include "repository.h"
#include "hash.h"
-#include "hash.h"
#include "object.h"
#include "loose.h"
#include "commit.h"
protocol-caps.c
-1
index ecdd0dc58d..35072ed60b 100644
--- a/protocol-caps.c
+++ b/protocol-caps.c
@@ -4,7 +4,6 @@
#include "hex.h"
#include "pkt-line.h"
#include "hash.h"
-#include "hex.h"
#include "object.h"
#include "odb.h"
#include "repository.h"
setup.c
-1
index b723f8b339..6b234f67e2 100644
--- a/setup.c
+++ b/setup.c
@@ -25,7 +25,6 @@
#include "trace.h"
#include "trace2.h"
#include "worktree.h"
-#include "exec-cmd.h"
static int inside_git_dir = -1;
static int inside_work_tree = -1;