summaryrefslogtreecommitdiff
path: root/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2020-02-23 23:32:27 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-24 12:55:53 -0800
commit500e4f236606684467b0b34b86e319dfa40747c4 (patch)
tree8a1b6e6a668a609c28937c9dcddb71269412fbfc /t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
parentpack-objects: use object_id struct in pack-reuse code (diff)
downloadtgif-500e4f236606684467b0b34b86e319dfa40747c4.tar.xz
pack-bitmap: use object_id when loading on-disk bitmaps
A pack bitmap file contains the index position of the commit for each bitmap, which we then translate into an object id via nth_packed_object_sha1(). In preparation for that function going away, we can switch to the more type-safe nth_packed_object_id(). Note that even though the result ends up in an object_id this does incur an extra copy of the hash (into our temporary object_id, and then into the final malloc'd stored_bitmap struct). This shouldn't make any measurable difference. If it did, we could avoid this copy _and_ the copy of the rest of the items by allocating the stored_bitmap struct beforehand and reading directly into it from the bitmap file. Or better still, if this is a bottleneck, we could introduce an on-disk index to the bitmap file so we don't have to read every single entry to use just one of them. So it's not worth worrying about micro-optimizing out this one hash copy. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master')
0 files changed, 0 insertions, 0 deletions