diff mbox series

[08/12] pkt-line.h: remove unnecessary include

Message ID bc1fe09e996374868e8381a62ee5882df6b91223.1701585683.git.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 545f7b50e8c7c63c3e763519f64846624dce6d52
Headers show
Series Additional header cleanups (removing unnecessary includes) | expand

Commit Message

Elijah Newren Dec. 3, 2023, 6:41 a.m. UTC
From: Elijah Newren <newren@gmail.com>

The unnecessary include in the header transitively pulled in some
other headers actually needed by source files, though.  Have those
source files explicitly include the headers they need.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 pkt-line.c               | 1 +
 pkt-line.h               | 1 -
 t/helper/test-pkt-line.c | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/pkt-line.c b/pkt-line.c
index af83a19f4df..236dd3a3ee1 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -4,6 +4,7 @@ 
 #include "gettext.h"
 #include "hex.h"
 #include "run-command.h"
+#include "sideband.h"
 #include "trace.h"
 #include "write-or-die.h"
 
diff --git a/pkt-line.h b/pkt-line.h
index 954eec87197..aedef56286f 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -2,7 +2,6 @@ 
 #define PKTLINE_H
 
 #include "strbuf.h"
-#include "sideband.h"
 
 /*
  * Write a packetized stream, where each line is preceded by
diff --git a/t/helper/test-pkt-line.c b/t/helper/test-pkt-line.c
index f4d134a1452..77e99c37df0 100644
--- a/t/helper/test-pkt-line.c
+++ b/t/helper/test-pkt-line.c
@@ -1,6 +1,7 @@ 
 #include "git-compat-util.h"
 #include "test-tool.h"
 #include "pkt-line.h"
+#include "sideband.h"
 #include "write-or-die.h"
 
 static void pack_line(const char *line)