diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-02-10 14:48:31 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-02-10 14:48:31 -0800 |
| commit | 9d5b1c06ac1e46e985b5d62bccb78d9fb6de374a (patch) | |
| tree | c608df8a6a629c97921530898a40b7ffa52b1a35 /hash-lookup.h | |
| parent | 1d4f2316c5b767ccbf20cc3d55c98d1f92e6e1ce (diff) | |
| parent | 8380dcd700e80cd22745bcffb3625f90f943950c (diff) | |
| download | git-9d5b1c06ac1e46e985b5d62bccb78d9fb6de374a.tar.gz | |
Merge branch 'jk/use-oid-pos'
Code clean-up to ensure our use of hashtables using object names as
keys use the "struct object_id" objects, not the raw hash values.
* jk/use-oid-pos:
oid_pos(): access table through const pointers
hash_pos(): convert to oid_pos()
rerere: use strmap to store rerere directories
rerere: tighten rr-cache dirname check
rerere: check dirname format while iterating rr_cache directory
commit_graft_pos(): take an oid instead of a bare hash
Diffstat (limited to 'hash-lookup.h')
| -rw-r--r-- | hash-lookup.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hash-lookup.h b/hash-lookup.h index 5d476dec72..dbd71ebaf7 100644 --- a/hash-lookup.h +++ b/hash-lookup.h @@ -1,12 +1,12 @@ #ifndef HASH_LOOKUP_H #define HASH_LOOKUP_H -typedef const unsigned char *hash_access_fn(size_t index, void *table); +typedef const struct object_id *oid_access_fn(size_t index, const void *table); -int hash_pos(const unsigned char *hash, - void *table, - size_t nr, - hash_access_fn fn); +int oid_pos(const struct object_id *oid, + const void *table, + size_t nr, + oid_access_fn fn); /* * Searches for hash in table, using the given fanout table to determine the |
