fast-export: stop storing lengths in anonymized hashmaps
commita0f65641dfb67ffa94f1e33ded2cbab8d77d53a5
authorJeff King <peff@peff.net>
Tue, 23 Jun 2020 15:24:56 +0000 (23 11:24 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Jun 2020 02:56:26 +0000 (23 19:56 -0700)
tree7a7ec96b58f2c76ab8c2cd91ec457c61adfde191
parent7f4075949686dcd01e364049350ac989c5fc2913
fast-export: stop storing lengths in anonymized hashmaps

Now that the anonymize_str() interface is restricted to NUL-terminated
strings, there's no need for us to keep track of the length of each
entry in the hashmap. This simplifies the code and saves a bit of
memory.

Note that we do still need to compare the stored results to partial
strings passed in by the callers. We can do that by using hashmap's
keydata feature to get the ptr/len pair into the comparison function,
and then using strncmp().

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-export.c