From eea0e59ffbed6e33d171ace5be13cde9faa41639 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sat, 23 Dec 2023 17:14:50 +0000 Subject: treewide: remove unnecessary includes in source files Each of these were checked with gcc -E -I. ${SOURCE_FILE} | grep ${HEADER_FILE} to ensure that removing the direct inclusion of the header actually resulted in that header no longer being included at all (i.e. that no other header pulled it in transitively). ...except for a few cases where we verified that although the header was brought in transitively, nothing from it was directly used in that source file. These cases were: * builtin/credential-cache.c * builtin/pull.c * builtin/send-pack.c Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- refs/files-backend.c | 2 -- refs/packed-backend.c | 1 - refs/ref-cache.c | 1 - 3 files changed, 4 deletions(-) (limited to 'refs') diff --git a/refs/files-backend.c b/refs/files-backend.c index db5c0c7a72..922e65e0d9 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -1,5 +1,4 @@ #include "../git-compat-util.h" -#include "../config.h" #include "../copy.h" #include "../environment.h" #include "../gettext.h" @@ -19,7 +18,6 @@ #include "../dir.h" #include "../chdir-notify.h" #include "../setup.h" -#include "../worktree.h" #include "../wrapper.h" #include "../write-or-die.h" #include "../revision.h" diff --git a/refs/packed-backend.c b/refs/packed-backend.c index 59c78d7941..5963e67c14 100644 --- a/refs/packed-backend.c +++ b/refs/packed-backend.c @@ -1,5 +1,4 @@ #include "../git-compat-util.h" -#include "../alloc.h" #include "../config.h" #include "../gettext.h" #include "../hash.h" diff --git a/refs/ref-cache.c b/refs/ref-cache.c index 6e3b725245..a372a00941 100644 --- a/refs/ref-cache.c +++ b/refs/ref-cache.c @@ -1,5 +1,4 @@ #include "../git-compat-util.h" -#include "../alloc.h" #include "../hash.h" #include "../refs.h" #include "../repository.h" -- cgit v1.2.3