]> git.ipfire.org Git - thirdparty/git.git/commitdiff
treewide: remove unnecessary includes from header files
authorElijah Newren <newren@gmail.com>
Sat, 23 Dec 2023 17:14:49 +0000 (17:14 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 Dec 2023 20:04:31 +0000 (12:04 -0800)
There are three kinds of unnecessary includes:
  * includes which aren't directly needed, but which include some other
    forgotten include
  * includes which could be replaced by a simple forward declaration of
    some structs
  * includes which aren't needed at all

Remove the third kind of include.  Subsequent commits (and a subsequent
series) will work on removing some of the other kinds of includes.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-pack.h
midx.h
ref-filter.h
submodule-config.h

index 8c7752fc8212c7f911f9f462a2b306c48022bc2f..6775d265175748d2fccd2b9571c864a6ec091f20 100644 (file)
@@ -2,7 +2,6 @@
 #define FETCH_PACK_H
 
 #include "string-list.h"
-#include "run-command.h"
 #include "protocol.h"
 #include "list-objects-filter-options.h"
 #include "oidset.h"
diff --git a/midx.h b/midx.h
index a5d98919c857b812789f44d86fb6ad13fb7e0560..eb57a37519ce018fdd7aa9ba0d9d6c11003d5452 100644 (file)
--- a/midx.h
+++ b/midx.h
@@ -1,7 +1,6 @@
 #ifndef MIDX_H
 #define MIDX_H
 
-#include "repository.h"
 #include "string-list.h"
 
 struct object_id;
index 1524bc463a5701d475cb68e50caa884a6daf890a..4ecb6ab1c6039ebca47ec6d7bfaee22a94d5e9f0 100644 (file)
@@ -3,7 +3,6 @@
 
 #include "gettext.h"
 #include "oid-array.h"
-#include "refs.h"
 #include "commit.h"
 #include "string-list.h"
 #include "strvec.h"
index 2a37689cc272e30fa6f5dc9cfbbde044a52068c3..e8164cca3e459ea0adad9f17cad825208d3ea8d7 100644 (file)
@@ -2,7 +2,6 @@
 #define SUBMODULE_CONFIG_CACHE_H
 
 #include "config.h"
-#include "hashmap.h"
 #include "submodule.h"
 #include "strbuf.h"
 #include "tree-walk.h"