summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit.http
diff options
context:
space:
mode:
authorLuca Milanesio <luca.milanesio@gmail.com>2022-12-28 01:09:52 +0000
committerMatthias Sohn <matthias.sohn@sap.com>2023-01-31 14:15:56 +0100
commite4529cd39c42872e9b4f80d38659f9de37956634 (patch)
treeef035c8e7ac0b59920955a604522243080385e22 /org.eclipse.jgit.junit.http
parent611412a05528ba5898cf948f4d3959f1fbc4170a (diff)
downloadjgit-e4529cd39c42872e9b4f80d38659f9de37956634.tar.gz
jgit-e4529cd39c42872e9b4f80d38659f9de37956634.zip
PackWriterBitmapPreparer: do not include annotated tags in bitmap
The annotated tags should be excluded from the bitmap associated with the heads-only packfile. However, this was not happening because of the check of exclusion of the peeled object instead of the objectId to be excluded from the bitmap. Sample use-case: refs/heads/main ^ | commit1 <-- commit2 <- annotated-tag1 <- tag1 ^ | commit0 When creating a bitmap for the above commit graph, before this change all the commits are included (3 bitmaps), which is incorrect, because all commits reachable from annotated tags should not be included. The heads-only bitmap should include only commit0 and commit1 but because PackWriterBitPreparer was checking for the peeled pointer of tag1 to be excluded (commit2) which was not found in the list of tags to exclude (annotated-tag1), the commit2 was included, even if it wasn't reachable only from the head. Add an additional check for exclusion of the original objectId for allowing the exclusion of annotated tags and their pointed commits. Add one specific test associated with an annotated tag for making sure that this use-case is covered also. Example repository benchmark for measuring the improvement: # refs: 400k (2k heads, 88k tags, 310k changes) # objects: 11M (88k of them are annotate tags) # packfiles: 2.7G Before this change: GC time: 5h clone --bare time: 7 mins After this change: GC time: 20 mins clone --bare time: 3 mins Bug: 581267 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> Change-Id: Iff2bfc6587153001837220189a120ead9ac649dc
Diffstat (limited to 'org.eclipse.jgit.junit.http')
0 files changed, 0 insertions, 0 deletions