From d1cbe1e6d8a9cab2b4ffe8a17d34db214dce1e49 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sat, 22 Apr 2023 20:17:20 +0000 Subject: hash-ll.h: split out of hash.h to remove dependency on repository.h hash.h depends upon and includes repository.h, due to the definition and use of the_hash_algo (defined as the_repository->hash_algo). However, most headers trying to include hash.h are only interested in the layout of the structs like object_id. Move the parts of hash.h that do not depend upon repository.h into a new file hash-ll.h (the "low level" parts of hash.h), and adjust other files to use this new header where the convenience inline functions aren't needed. This allows hash.h and object.h to be fairly small, minimal headers. It also exposes a lot of hidden dependencies on both path.h (which was brought in by repository.h) and repository.h (which was previously implicitly brought in by object.h), so also adjust other files to be more explicit about what they depend upon. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- copy.c | 1 + 1 file changed, 1 insertion(+) (limited to 'copy.c') diff --git a/copy.c b/copy.c index db6b615c18..923d8a6dc6 100644 --- a/copy.c +++ b/copy.c @@ -1,5 +1,6 @@ #include "cache.h" #include "copy.h" +#include "path.h" #include "wrapper.h" int copy_fd(int ifd, int ofd) -- cgit v1.2.3