From b9a7ac2c6897efbf78fd546b21986498577e3585 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 16 May 2023 06:34:07 +0000 Subject: hash-ll, hashmap: move oidhash() to hash-ll oidhash() was used by both hashmap and khash, which makes sense. However, the location of this function in hashmap.[ch] meant that khash.h had to depend upon hashmap.h, making people unfamiliar with khash think that it was built upon hashmap. (Or at least, I personally was confused for a while about this in the past.) Move this function to hash-ll, so that khash.h can stop depending upon hashmap.h. This has another benefit as well: it allows us to remove hashmap.h's dependency on hash-ll.h. While some callers of hashmap.h were making use of oidhash, most were not, so this change provides another way to reduce the number of includes. Diff best viewed with `--color-moved`. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- dir.h | 1 + 1 file changed, 1 insertion(+) (limited to 'dir.h') diff --git a/dir.h b/dir.h index 79b85a01ee..279a066080 100644 --- a/dir.h +++ b/dir.h @@ -1,6 +1,7 @@ #ifndef DIR_H #define DIR_H +#include "hash-ll.h" #include "hashmap.h" #include "pathspec.h" #include "statinfo.h" -- cgit v1.2.3