summaryrefslogtreecommitdiff
path: root/oidset.h
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-02-19 00:04:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-01 02:57:37 (GMT)
commit5a8643eff1e59f1cf96da9875d5716e88f480710 (patch)
tree6522b331529f0a7413fb54a2fc301a6e2d3031a1 /oidset.h
parent76c23892bcbc5e8fba1f6d844b05752082d0542e (diff)
downloadgit-5a8643eff1e59f1cf96da9875d5716e88f480710.zip
git-5a8643eff1e59f1cf96da9875d5716e88f480710.tar.gz
git-5a8643eff1e59f1cf96da9875d5716e88f480710.tar.bz2
khash: move oid hash table definition
Move the oid khash table definition to khash.h and define a typedef for it, similar to the one we have for unsigned char pointers. Define variants that are maps as well. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'oidset.h')
-rw-r--r--oidset.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/oidset.h b/oidset.h
index c9d0f6d..14f18f7 100644
--- a/oidset.h
+++ b/oidset.h
@@ -16,18 +16,6 @@
* table overhead.
*/
-static inline unsigned int oid_hash(struct object_id oid)
-{
- return sha1hash(oid.hash);
-}
-
-static inline int oid_equal(struct object_id a, struct object_id b)
-{
- return oideq(&a, &b);
-}
-
-KHASH_INIT(oid, struct object_id, int, 0, oid_hash, oid_equal)
-
/**
* A single oidset; should be zero-initialized (or use OIDSET_INIT).
*/