Convert memcpy(a,b,20) to hashcpy(a,b).
authorShawn Pearce <spearce@spearce.org>
Wed, 23 Aug 2006 06:49:00 +0000 (02:49 -0400)
committerJunio C Hamano <junkio@cox.net>
Wed, 23 Aug 2006 20:53:10 +0000 (13:53 -0700)
commite702496e434a160f798447b95b9cea3cd138c140
tree76b73202f627b69604b8a6e7d0e2f9c5eb0e27a9
parentb05faa2da9ec24d737bbba47c71e815255f3eaa7
Convert memcpy(a,b,20) to hashcpy(a,b).

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: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
34 files changed:
blame.c
builtin-diff.c
builtin-pack-objects.c
builtin-read-tree.c
builtin-unpack-objects.c
builtin-update-index.c
builtin-write-tree.c
cache-tree.c
cache.h
combine-diff.c
connect.c
convert-objects.c
csum-file.c
diff-lib.c
diff.c
fetch-pack.c
fetch.c
fsck-objects.c
http-fetch.c
http-push.c
index-pack.c
mktree.c
object.c
patch-id.c
receive-pack.c
refs.c
revision.c
send-pack.c
sha1_file.c
sha1_name.c
tree-walk.c
tree.c
unpack-trees.c
upload-pack.c