git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] Header includes cleanup

From
NDNathaniel P Dawson <nathaniel.dawson@gmail.com>
Date
Mar 30, 2009, 09:55 UTC
Message-ID
<1238406925-15907-4-git-send-email-nathaniel.dawson@gmail.com>
In-Reply-To
<1238406925-15907-3-git-send-email-nathaniel.dawson@gmail.com>
Deleted header includes of git-compat-util.h, strbuf.h, hash.h where cache.h was included since cache.h includes them.
Signed-off-by: Nathaniel P Dawson <nathaniel.dawson@gmail.com>
---
 builtin-clone.c   |    1 -
 builtin-remote.c  |    1 -
 connect.c         |    1 -
 diffcore-rename.c |    1 -
 editor.c          |    1 -
 hash.c            |    1 -
 parse-options.c   |    3 +--
 shell.c           |    1 -
 test-delta.c      |    3 +--
 9 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/builtin-clone.c b/builtin-clone.c
index 0031b5f..50cb6ba 100644
--- a/builtin-clone.c
+++ b/builtin-clone.c
@@ -16,7 +16,6 @@
 #include "tree-walk.h"
 #include "unpack-trees.h"
 #include "transport.h"
-#include "strbuf.h"
 #include "dir.h"
 #include "pack-refs.h"
 #include "sigchain.h"
diff --git a/builtin-remote.c b/builtin-remote.c
index 9ef846f..5bf8042 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -3,7 +3,6 @@
 #include "transport.h"
 #include "remote.h"
 #include "string-list.h"
-#include "strbuf.h"
 #include "run-command.h"
 #include "refs.h"
 
diff --git a/connect.c b/connect.c
index 7636bf9..12a5c2b 100644
--- a/connect.c
+++ b/connect.c
@@ -1,4 +1,3 @@
-#include "git-compat-util.h"
 #include "cache.h"
 #include "pkt-line.h"
 #include "quote.h"
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 0b0d6b8..00e1ce1 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -4,7 +4,6 @@
 #include "cache.h"
 #include "diff.h"
 #include "diffcore.h"
-#include "hash.h"
 
 /* Table of rename/copy destinations */
 
diff --git a/editor.c b/editor.c
index 4d469d0..22fd4c0 100644
--- a/editor.c
+++ b/editor.c
@@ -1,5 +1,4 @@
 #include "cache.h"
-#include "strbuf.h"
 #include "run-command.h"
 
 int launch_editor(const char *path, struct strbuf *buffer, const char *const *env)
diff --git a/hash.c b/hash.c
index 1cd4c9d..5a68fdf 100644
--- a/hash.c
+++ b/hash.c
@@ -2,7 +2,6 @@
  * Some generic hashing helpers.
  */
 #include "cache.h"
-#include "hash.h"
 
 /*
  * Look up a hash entry in the hash table. Return the pointer to
diff --git a/parse-options.c b/parse-options.c
index cf71bcf..bafeeea 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -1,6 +1,5 @@
-#include "git-compat-util.h"
-#include "parse-options.h"
 #include "cache.h"
+#include "parse-options.h"
 #include "commit.h"
 
 #define OPT_SHORT 1
diff --git a/shell.c b/shell.c
index e339369..37c52c2 100644
--- a/shell.c
+++ b/shell.c
@@ -1,7 +1,6 @@
 #include "cache.h"
 #include "quote.h"
 #include "exec_cmd.h"
-#include "strbuf.h"
 
 static int do_generic_cmd(const char *me, char *arg)
 {
diff --git a/test-delta.c b/test-delta.c
index 3d885ff..3d90611 100644
--- a/test-delta.c
+++ b/test-delta.c
@@ -8,9 +8,8 @@
  * published by the Free Software Foundation.
  */
 
-#include "git-compat-util.h"
-#include "delta.h"
 #include "cache.h"
+#include "delta.h"
 
 static const char usage_str[] =
 	"test-delta (-d|-p) <from_file> <data_file> <out_file>";
-- 
1.6.1.3
Previous: Nathaniel P DawsonNext: Nathaniel P Dawson
Message 4 of 17 in “Header includes cleanup”
  1. 0/5 Header includes cleanupNathaniel P Dawson, Mar 30, 2009
  2. 1/5 Header includes cleanupNathaniel P Dawson, Mar 30, 2009
  3. 2/5 Header includes cleanupNathaniel P Dawson, Mar 30, 2009
  4. 3/5 Header includes cleanupNathaniel P Dawson, Mar 30, 2009
  5. 4/5 Header includes cleanupNathaniel P Dawson, Mar 30, 2009
  6. 5/5 Header includes cleanupNathaniel P Dawson, Mar 30, 2009
  7. Johannes SixtMar 30, 2009
  8. Nathaniel P DawsonMar 30, 2009
  9. Christian CouderMar 31, 2009
  10. Junio C HamanoMar 31, 2009
  11. Christian CouderApr 2, 2009
  12. Junio C HamanoApr 2, 2009
  13. Jeff KingApr 2, 2009
  14. Christian CouderApr 3, 2009
  15. Jeff KingApr 3, 2009
  16. Christian CouderApr 3, 2009
  17. Christian CouderMar 31, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.