Skip to content
  • Stefan Beller's avatar
    patch-ids.c: use hashmap correctly · 3da492f8
    Stefan Beller authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    As alluded to in the previous patch, the code in patch-ids.c is
    using the hashmaps API wrong.
    
    Luckily we do not have a bug, as all hashmap functionality that we use
    here (hashmap_get) passes through the keydata.  If hashmap_get_next were
    to be used, a bug would occur as that passes NULL for the key_data.
    
    So instead use the hashmap API correctly and provide the caller required
    data in the compare function via the first argument that always gets
    passed and was setup via the hashmap_init function.
    
    Signed-off-by: default avatarStefan Beller <sbeller@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    3da492f8