pretty: allow showing specific trailers
[gitweb.git] / pack-objects.c
index 7f7b7dddf6955b2f791e2d97cd90381e5edfd339..b6cdbb0166fb5a3d6af3cfda2e7e259e3d54abe8 100644 (file)
@@ -16,7 +16,7 @@ static uint32_t locate_object_entry_hash(struct packing_data *pdata,
        while (pdata->index[i] > 0) {
                uint32_t pos = pdata->index[i] - 1;
 
-               if (!hashcmp(sha1, pdata->objects[pos].idx.oid.hash)) {
+               if (hasheq(sha1, pdata->objects[pos].idx.oid.hash)) {
                        *found = 1;
                        return i;
                }
@@ -148,6 +148,9 @@ void prepare_packing_data(struct packing_data *pdata)
                                             1U << OE_SIZE_BITS);
        pdata->oe_delta_size_limit = git_env_ulong("GIT_TEST_OE_DELTA_SIZE",
                                                   1UL << OE_DELTA_SIZE_BITS);
+#ifndef NO_PTHREADS
+       pthread_mutex_init(&pdata->lock, NULL);
+#endif
 }
 
 struct object_entry *packlist_alloc(struct packing_data *pdata,