diff options
Diffstat (limited to 'src/oid.c')
-rw-r--r-- | src/oid.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -190,6 +190,16 @@ int git_oid_streq(const git_oid *a, const char *str) return git_oid_cmp(a, &id) == 0 ? GIT_SUCCESS : GIT_ERROR; } +int git_oid_iszero(const git_oid *oid_a) +{ + const unsigned char *a = oid_a->id; + unsigned int i; + for (i = 0; i < GIT_OID_RAWSZ; ++i, ++a) + if (*a != 0) + return 0; + return 1; +} + typedef short node_index; typedef union { |