oid: define GIT_OID_SHA1_ZERO

Callers should not assume the layout of the oid structure; provide them
a macro that defines the null / zero sha1 object id.
This commit is contained in:
Edward Thomson
2022-01-17 13:40:37 -05:00
parent dbc4ac1c76
commit 0acaf3a8eb
24 changed files with 65 additions and 62 deletions

View File

@@ -679,7 +679,7 @@ static void reference_listing(git_repository *repo)
for (i = 0; i < ref_list.count; ++i) {
git_reference *ref;
char oid_hex[GIT_OID_SHA1_HEXSIZE+1] = GIT_OID_HEX_ZERO;
char oid_hex[GIT_OID_SHA1_HEXSIZE+1] = GIT_OID_SHA1_HEXZERO;
const char *refname;
refname = ref_list.strings[i];