[PATCH v4] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-06 Thread Sun He
hashcpy() can keep the abstraction of object name behind it. Use it instead of memcpy() with hard-coded 20-byte length when moving object names between pieces of memory. We can benefit from it, when we switch to another hash algorithm, eg. MD5, by just fixing the hashcpy(). Leave ppc/sha1.c as it

Re: [PATCH v4] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-06 Thread Junio C Hamano
Sun He sunheeh...@gmail.com writes: hashcpy() can keep the abstraction of object name behind it. Do we really want to change the phrasing you took the above from to say *can* keep? Providing the object name abstraction is the whole point of the function, so of course it can keep it, but that