summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-03-22 14:53:39 -0400
committerJunio C Hamano <gitster@pobox.com>2012-03-23 13:52:13 -0700
commitf8582cad8d11cae15e73fe5213b6180ee4b9fcce (patch)
tree245bdd3d26d92b1a44c7ac42d88141b3d623acfe /read-cache.c
parentcba595bd21fd0731e37898dbd6c5b55f65fd8aea (diff)
downloadgit-f8582cad8d11cae15e73fe5213b6180ee4b9fcce.tar.gz
make is_empty_blob_sha1 available everywhere
The read-cache implementation defines this static function, but it is a generally useful concept in git. Let's give the empty blob the same treatment as the empty tree, providing both hex and binary forms of the sha1. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/read-cache.c b/read-cache.c
index 274e54b4f3..6c8f395836 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -157,16 +157,6 @@ static int ce_modified_check_fs(struct cache_entry *ce, struct stat *st)
return 0;
}
-static int is_empty_blob_sha1(const unsigned char *sha1)
-{
- static const unsigned char empty_blob_sha1[20] = {
- 0xe6,0x9d,0xe2,0x9b,0xb2,0xd1,0xd6,0x43,0x4b,0x8b,
- 0x29,0xae,0x77,0x5a,0xd8,0xc2,0xe4,0x8c,0x53,0x91
- };
-
- return !hashcmp(sha1, empty_blob_sha1);
-}
-
static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
{
unsigned int changed = 0;