diff options
author | Brandon Williams <bmwill@google.com> | 2017-05-30 10:30:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-02 09:36:06 +0900 |
commit | 1c41c82bc4878138a4c58e4d5df200de17cb8565 (patch) | |
tree | 97762b54e2d19ff683481ab2dc43db585d2023aa /cache.h | |
parent | 5ee8a954e0191be2a144afdda6e37ef776730246 (diff) | |
download | git-1c41c82bc4878138a4c58e4d5df200de17cb8565.tar.gz |
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>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |