]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/fast-export.c
hashmap_get{,_from_hash} return "struct hashmap_entry *"
[thirdparty/git.git] / builtin / fast-export.c
index c22cef3b2faff945148029197a32253540c24f73..25195badd4341bfe311c62550c73324e12c21df6 100644 (file)
@@ -148,10 +148,10 @@ static const void *anonymize_mem(struct hashmap *map,
        if (!map->cmpfn)
                hashmap_init(map, anonymized_entry_cmp, NULL, 0);
 
-       hashmap_entry_init(&key, memhash(orig, *len));
+       hashmap_entry_init(&key.hash, memhash(orig, *len));
        key.orig = orig;
        key.orig_len = *len;
-       ret = hashmap_get(map, &key, NULL);
+       ret = hashmap_get_entry(map, &key, NULL, struct anonymized_entry, hash);
 
        if (!ret) {
                ret = xmalloc(sizeof(*ret));
@@ -160,7 +160,7 @@ static const void *anonymize_mem(struct hashmap *map,
                ret->orig_len = *len;
                ret->anon = generate(orig, len);
                ret->anon_len = *len;
-               hashmap_put(map, ret);
+               hashmap_put(map, &ret->hash);
        }
 
        *len = ret->anon_len;
@@ -275,7 +275,7 @@ static void export_blob(const struct object_id *oid)
        if (is_null_oid(oid))
                return;
 
-       object = lookup_object(the_repository, oid->hash);
+       object = lookup_object(the_repository, oid);
        if (object && object->flags & SHOWN)
                return;
 
@@ -453,7 +453,7 @@ static void show_filemodify(struct diff_queue_struct *q,
                                                  &spec->oid));
                        else {
                                struct object *object = lookup_object(the_repository,
-                                                                     spec->oid.hash);
+                                                                     &spec->oid);
                                printf("M %06o :%d ", spec->mode,
                                       get_object_mark(object));
                        }