diff options
Diffstat (limited to 'hash-ll.h')
| -rw-r--r-- | hash-ll.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -341,6 +341,12 @@ static inline unsigned int oidhash(const struct object_id *oid) return hash; } +static inline int is_null_oid(const struct object_id *oid) +{ + static const unsigned char null_hash[GIT_MAX_RAWSZ]; + return !memcmp(oid->hash, null_hash, GIT_MAX_RAWSZ); +} + const char *empty_tree_oid_hex(void); const char *empty_blob_oid_hex(void); |
