]> git.ipfire.org Git - thirdparty/git.git/commitdiff
remove duplicate includes
authorRené Scharfe <l.s.r@web.de>
Sun, 8 Feb 2026 12:32:22 +0000 (13:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 8 Feb 2026 23:03:06 +0000 (15:03 -0800)
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>
builtin/blame.c
builtin/log.c
builtin/pack-objects.c
commit.c
object-file-convert.c
protocol-caps.c
setup.c

index 6044973462a173a5e1fdb5165be69d544addbb37..6588161382e3cc6ec15fa6bfd1c5ed4c7509857a 100644 (file)
@@ -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"
index 5c9a8ef3632906544a37a9bb66c4713dd774b722..43af5047e3fa971146e7207fcbf72f64a7e02af6 100644 (file)
@@ -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"
index 5846b6a293a27b0841d54213cc71e616855e59f8..9768c7bf0be1693fe1e7d03aab805527d65c379c 100644 (file)
@@ -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.
index 28bb5ce029f3c521f0e2cc670a9667989a84f580..515d77e7d35a80486f64fb0a799e992aa35d4c2a 100644 (file)
--- 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 **);
 
index 7ab875afe6cb3ac8fb505a6c25016528fdb29461..781328659679ce737d710ff1ec5b98de3a8ff34e 100644 (file)
@@ -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"
index ecdd0dc58d5aabefb310fc231446ac6626f0d81c..35072ed60b7f4d0c2ee5ba20dcc5ef62bb9412a3 100644 (file)
@@ -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"
diff --git a/setup.c b/setup.c
index b723f8b33931bd22246d4120afed3b7bef59c8ae..6b234f67e216273a7bb4922fb9bb2ad4b03355ef 100644 (file)
--- 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;