Skip to content
  • Shawn Pearce's avatar
    Convert memcpy(a,b,20) to hashcpy(a,b). · e702496e
    Shawn Pearce authored
    
    
    This abstracts away the size of the hash values when copying them
    from memory location to memory location, much as the introduction
    of hashcmp abstracted away hash value comparsion.
    
    A few call sites were using char* rather than unsigned char* so
    I added the cast rather than open hashcpy to be void*.  This is a
    reasonable tradeoff as most call sites already use unsigned char*
    and the existing hashcmp is also declared to be unsigned char*.
    
    [jc: Splitted the patch to "master" part, to be followed by a
     patch for merge-recursive.c which is not in "master" yet.
    
     Fixed the cast in the latter hunk to combine-diff.c which was
     wrong in the original.
    
     Also converted ones left-over in combine-diff.c, diff-lib.c and
     upload-pack.c ]
    
    Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
    Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
    e702496e