]> git.ipfire.org Git - thirdparty/git.git/blobdiff - bulk-checkin.c
The sixth batch
[thirdparty/git.git] / bulk-checkin.c
index 9f3b644811cd79b2c93ebf1dcebd711640c18419..583aacb9e36bded9047d5f18219637ba1613a612 100644 (file)
@@ -67,12 +67,12 @@ static int already_written(struct bulk_checkin_state *state, struct object_id *o
        int i;
 
        /* The object may already exist in the repository */
-       if (has_sha1_file(oid->hash))
+       if (has_object_file(oid))
                return 1;
 
        /* Might want to keep the list sorted */
        for (i = 0; i < state->nr_written; i++)
-               if (!oidcmp(&state->written[i]->oid, oid))
+               if (oideq(&state->written[i]->oid, oid))
                        return 1;
 
        /* This is a new object we need to keep */
@@ -197,7 +197,7 @@ static int deflate_to_pack(struct bulk_checkin_state *state,
        git_hash_ctx ctx;
        unsigned char obuf[16384];
        unsigned header_len;
-       struct hashfile_checkpoint checkpoint;
+       struct hashfile_checkpoint checkpoint = {0};
        struct pack_idx_entry *idx = NULL;
 
        seekback = lseek(fd, 0, SEEK_CUR);