Skip to content
  • René Scharfe's avatar
    http-push: use hex_to_bytes() · c3bdc4e7
    René Scharfe authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The path of a loose object contains its hash value encoded into two
    substrings of hexadecimal digits, separated by a slash.  The current
    code copies the pieces into a temporary buffer to get rid of the slash
    and then uses get_oid_hex() to decode the hash value.
    
    Avoid the copy by using hex_to_bytes() directly on the substrings.
    That's shorter and easier.
    
    While at it correct the length of the second substring in a comment.
    
    Signed-off-by: default avatarRene Scharfe <l.s.r@web.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    c3bdc4e7