diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-07-09 15:25:43 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-07-09 15:25:43 -0700 |
| commit | a7db4c193d98f701eda0328dbf69b36f28dd22d3 (patch) | |
| tree | 653e22bcdb1c8bfccb5153426910fa0bfb7d715d /builtin/name-rev.c | |
| parent | a4c8352e1e13d362b2c09c94975fcd17639ff2a0 (diff) | |
| parent | d40abc8e95f75b529feb140178b69a3783c2d108 (diff) | |
| download | git-a7db4c193d98f701eda0328dbf69b36f28dd22d3.tar.gz | |
Merge branch 'jk/oidhash'
Code clean-up to remove hardcoded SHA-1 hash from many places.
* jk/oidhash:
hashmap: convert sha1hash() to oidhash()
hash.h: move object_id definition from cache.h
khash: rename oid helper functions
khash: drop sha1-specific map types
pack-bitmap: convert khash_sha1 maps into kh_oid_map
delta-islands: convert island_marks khash to use oids
khash: rename kh_oid_t to kh_oid_set
khash: drop broken oid_map typedef
object: convert create_object() to use object_id
object: convert internal hash_obj() to object_id
object: convert lookup_object() to use object_id
object: convert lookup_unknown_object() to use object_id
pack-objects: convert locate_object_entry_hash() to object_id
pack-objects: convert packlist_find() to use object_id
pack-bitmap-write: convert some helpers to use object_id
upload-pack: rename a "sha1" variable to "oid"
describe: fix accidental oid/hash type-punning
Diffstat (limited to 'builtin/name-rev.c')
| -rw-r--r-- | builtin/name-rev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 16df43473a..c785fe16ba 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -378,8 +378,7 @@ static void name_rev_line(char *p, struct name_ref_data *data) *(p+1) = 0; if (!get_oid(p - (hexsz - 1), &oid)) { struct object *o = - lookup_object(the_repository, - oid.hash); + lookup_object(the_repository, &oid); if (o) name = get_rev_name(o, &buf); } |
