Re: [PATCH 10/15] hash: provide per-algorithm null OIDs
From: Junio C Hamano <hidden>
Date: 2021-04-11 14:03:12
From: Junio C Hamano <hidden>
Date: 2021-04-11 14:03:12
"brian m. carlson" [off-list ref] writes:
diff --git a/object-file.c b/object-file.c index 5f1fa05c4e..50bb5b6ca4 100644 --- a/object-file.c +++ b/object-file.c@@ -55,7 +55,6 @@ "\x6f\xe1\x41\xf7\x74\x91\x20\xa3\x03\x72" \ "\x18\x13" -const struct object_id null_oid; static const struct object_id empty_tree_oid = { EMPTY_TREE_SHA1_BIN_LITERAL, GIT_HASH_SHA1,@@ -64,6 +63,9 @@ static const struct object_id empty_blob_oid = { EMPTY_BLOB_SHA1_BIN_LITERAL, GIT_HASH_SHA1, }; +const struct object_id null_oid_sha1 = { + {0}, GIT_HASH_SHA1, +};
sparse wants this to be a file-scope static.