Skip to content
  • Jonathan Tan's avatar
    oidmap: map with OID as key · 9e6fabde
    Jonathan Tan authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    This is similar to using the hashmap in hashmap.c, but with an
    easier-to-use API. In particular, custom entry comparisons no longer
    need to be written, and lookups can be done without constructing a
    temporary entry structure.
    
    This is implemented as a thin wrapper over the hashmap API. In
    particular, this means that there is an additional 4-byte overhead due
    to the fact that the first 4 bytes of the hash is redundantly stored.
    For now, I'm taking the simpler approach, but if need be, we can
    reimplement oidmap without affecting the callers significantly.
    
    oidset has been updated to use oidmap.
    
    Signed-off-by: default avatarJonathan Tan <jonathantanmy@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    9e6fabde