Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-11-13 00:28:54 +0300
committerJunio C Hamano <gitster@pobox.com>2017-11-13 07:20:44 +0300
commiteb0ccfd7f5ce1765ada74abf272f002e1e34d1e4 (patch)
tree9042f094bd1f12d1249d714fdd177fcbe4fbf2a4 /cache.h
parent78a6766802ef32b82e6062e8e6ac5621894cc4a2 (diff)
Switch empty tree and blob lookups to use hash abstraction
Switch the uses of empty_tree_oid and empty_blob_oid to use the current_hash abstraction that represents the current hash algorithm in use. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/cache.h b/cache.h
index c238688f6c..d68895b45f 100644
--- a/cache.h
+++ b/cache.h
@@ -1024,22 +1024,22 @@ extern const struct object_id empty_blob_oid;
static inline int is_empty_blob_sha1(const unsigned char *sha1)
{
- return !hashcmp(sha1, EMPTY_BLOB_SHA1_BIN);
+ return !hashcmp(sha1, the_hash_algo->empty_blob->hash);
}
static inline int is_empty_blob_oid(const struct object_id *oid)
{
- return !hashcmp(oid->hash, EMPTY_BLOB_SHA1_BIN);
+ return !oidcmp(oid, the_hash_algo->empty_blob);
}
static inline int is_empty_tree_sha1(const unsigned char *sha1)
{
- return !hashcmp(sha1, EMPTY_TREE_SHA1_BIN);
+ return !hashcmp(sha1, the_hash_algo->empty_tree->hash);
}
static inline int is_empty_tree_oid(const struct object_id *oid)
{
- return !hashcmp(oid->hash, EMPTY_TREE_SHA1_BIN);
+ return !oidcmp(oid, the_hash_algo->empty_tree);
}
/* set default permissions by passing mode arguments to open(2) */