summaryrefslogtreecommitdiffstats
path: root/hash.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-06-14 08:49:45 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-14 19:26:32 +0200
commit129cb1b99df46771889c6d432055be4edd2b81b9 (patch)
tree76d79aac7c974374265195d9844cc21f9792c659 /hash.h
parentMerge branch 'gt/unit-test-oidtree' into ps/use-the-repository (diff)
downloadgit-129cb1b99df46771889c6d432055be4edd2b81b9.tar.xz
git-129cb1b99df46771889c6d432055be4edd2b81b9.zip
hash: drop (mostly) unused `is_empty_{blob,tree}_sha1()` functions
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>
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h10
1 files changed, 0 insertions, 10 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);