diff options
author | Elijah Newren <newren@gmail.com> | 2023-05-16 08:34:07 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-21 22:39:54 +0200 |
commit | b9a7ac2c6897efbf78fd546b21986498577e3585 (patch) | |
tree | 0d411dad1f60c27936b5b86d39ab88f2e2ac7d2b /khash.h | |
parent | object-store-ll.h: split this header out of object-store.h (diff) | |
download | git-b9a7ac2c6897efbf78fd546b21986498577e3585.tar.xz git-b9a7ac2c6897efbf78fd546b21986498577e3585.zip |
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 <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'khash.h')
-rw-r--r-- | khash.h | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -26,7 +26,6 @@ #ifndef __AC_KHASH_H #define __AC_KHASH_H -#include "hashmap.h" #include "hash.h" #define AC_VERSION_KHASH_H "0.2.8" |