summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hash.h10
-rw-r--r--read-cache.c2
2 files changed, 1 insertions, 11 deletions
diff --git a/hash.h b/hash.h
index e064807c17..a1161e1b22 100644
--- a/hash.h
+++ b/hash.h
@@ -84,21 +84,11 @@ static inline void oidread(struct object_id *oid, const unsigned char *hash)
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);
diff --git a/read-cache.c b/read-cache.c
index 447109aa76..10e002ce6d 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -337,7 +337,7 @@ static int ce_match_stat_basic(const struct cache_entry *ce, struct stat *st)
/* 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;
}