grep: convert to struct object_id
Convert the remaining parts of grep to use struct object_id. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
5ee8a954e0
commit
1c41c82bc4
7
cache.h
7
cache.h
@ -1026,6 +1026,13 @@ static inline void oidcpy(struct object_id *dst, const struct object_id *src)
|
||||
hashcpy(dst->hash, src->hash);
|
||||
}
|
||||
|
||||
static inline struct object_id *oiddup(const struct object_id *src)
|
||||
{
|
||||
struct object_id *dst = xmalloc(sizeof(struct object_id));
|
||||
oidcpy(dst, src);
|
||||
return dst;
|
||||
}
|
||||
|
||||
static inline void hashclr(unsigned char *hash)
|
||||
{
|
||||
memset(hash, 0, GIT_SHA1_RAWSZ);
|
||||
|
Reference in New Issue
Block a user