]> git.ipfire.org Git - thirdparty/git.git/blobdiff - midx.c
Merge branch 'ug/doc-lose-dircache' into maint
[thirdparty/git.git] / midx.c
diff --git a/midx.c b/midx.c
index d233b54ac71a0a81fea31ab0286025802a3ed240..79c282b070d26d5ffac866feaaee244fea986d43 100644 (file)
--- a/midx.c
+++ b/midx.c
@@ -298,7 +298,7 @@ static int nth_midxed_pack_entry(struct repository *r,
        pack_int_id = nth_midxed_pack_int_id(m, pos);
 
        if (prepare_midx_pack(r, m, pack_int_id))
-               die(_("error preparing packfile from multi-pack-index"));
+               return 0;
        p = m->packs[pack_int_id];
 
        /*
@@ -785,9 +785,7 @@ static size_t write_midx_large_offsets(struct hashfile *f, uint32_t nr_large_off
                if (!(offset >> 31))
                        continue;
 
-               hashwrite_be32(f, offset >> 32);
-               hashwrite_be32(f, offset & 0xffffffffUL);
-               written += 2 * sizeof(uint32_t);
+               written += hashwrite_be64(f, offset);
 
                nr_large_offset--;
        }
@@ -975,8 +973,7 @@ static int write_midx_internal(const char *object_dir, struct multi_pack_index *
                            chunk_offsets[i]);
 
                hashwrite_be32(f, chunk_ids[i]);
-               hashwrite_be32(f, chunk_offsets[i] >> 32);
-               hashwrite_be32(f, chunk_offsets[i]);
+               hashwrite_be64(f, chunk_offsets[i]);
 
                written += MIDX_CHUNKLOOKUP_WIDTH;
        }