Skip to content
  • Elijah Newren's avatar
    hash-ll, hashmap: move oidhash() to hash-ll · b9a7ac2c
    Elijah Newren authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarElijah Newren <newren@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    b9a7ac2c