From 41f1a8435a900b660b7a6bc9da8dce2665e4b70a Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 28 Jan 2025 09:41:30 +0100 Subject: git-compat-util: move include of "compat/zlib.h" into "git-zlib.h" We include "compat/zlib.h" in "git-compat-util.h", which is unnecessarily broad given that we only have a small handful of files that use the zlib library. Move the header into "git-zlib.h" instead and adapt users of zlib to include that header. One exception is the reftable library, as we don't want to use the Git-specific wrapper of zlib there, so we include "compat/zlib.h" instead. Furthermore, we move the include into "reftable/system.h" so that users of the library other than Git can wire up zlib themselves. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- csum-file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'csum-file.c') diff --git a/csum-file.c b/csum-file.c index 5716016e12..78e04356d3 100644 --- a/csum-file.c +++ b/csum-file.c @@ -11,9 +11,10 @@ #define USE_THE_REPOSITORY_VARIABLE #include "git-compat-util.h" -#include "progress.h" #include "csum-file.h" +#include "git-zlib.h" #include "hash.h" +#include "progress.h" static void verify_buffer_or_die(struct hashfile *f, const void *buf, -- cgit 1.2.3-korg