The functions `is_empty_{blob,tree}_sha1()` are mostly unused, except
for a single callsite in "read-cache.c". Most callsites have long since
been converted to use the equivalents that accept a `struct object_id`
instead of a string.
Adapt the remaining callsite and drop those functions.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
oidread_algop(oid, hash, the_hash_algo);
}
-static inline int is_empty_blob_sha1(const unsigned char *sha1)
-{
- return hasheq(sha1, the_hash_algo->empty_blob->hash);
-}
-
static inline int is_empty_blob_oid(const struct object_id *oid)
{
return oideq(oid, the_hash_algo->empty_blob);
}
-static inline int is_empty_tree_sha1(const unsigned char *sha1)
-{
- return hasheq(sha1, the_hash_algo->empty_tree->hash);
-}
-
static inline int is_empty_tree_oid(const struct object_id *oid)
{
return oideq(oid, the_hash_algo->empty_tree);
/* Racily smudged entry? */
if (!ce->ce_stat_data.sd_size) {
- if (!is_empty_blob_sha1(ce->oid.hash))
+ if (!is_empty_blob_oid(&ce->oid))
changed |= DATA_CHANGED;
}