Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2023-04-22 23:17:20 +0300
committerJunio C Hamano <gitster@pobox.com>2023-04-24 22:47:32 +0300
commitd1cbe1e6d8a9cab2b4ffe8a17d34db214dce1e49 (patch)
tree77bc199604bfda9597a2afbfce4dd121e7ba99db /negotiator
parent23a517e4156714c3f8c8a4e36beccfee1d76ff1f (diff)
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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'negotiator')
-rw-r--r--negotiator/default.c1
-rw-r--r--negotiator/skipping.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/negotiator/default.c b/negotiator/default.c
index f4b78eb47d..5cb2b1d204 100644
--- a/negotiator/default.c
+++ b/negotiator/default.c
@@ -4,6 +4,7 @@
#include "../fetch-negotiator.h"
#include "../prio-queue.h"
#include "../refs.h"
+#include "../repository.h"
#include "../tag.h"
/* Remember to update object flag allocation in object.h */
diff --git a/negotiator/skipping.c b/negotiator/skipping.c
index c7d6ab39bc..97e7e1ae72 100644
--- a/negotiator/skipping.c
+++ b/negotiator/skipping.c
@@ -5,6 +5,7 @@
#include "../hex.h"
#include "../prio-queue.h"
#include "../refs.h"
+#include "../repository.h"
#include "../tag.h"
/* Remember to update object flag allocation in object.h */