]> source.dussan.org Git - jgit.git/commit
Express the explicit intention of creating bitmaps in GC 08/202508/2
authorLuca Milanesio <luca.milanesio@gmail.com>
Sat, 10 Jun 2023 01:21:07 +0000 (02:21 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 5 Jul 2023 13:30:11 +0000 (15:30 +0200)
commit3a6eec9bb697a599a32ccb08ee176e6d4982f90f
treead990e58e46766bfa448999207f7d29a78099184
parentac8d7838f0ca332f7143be25ac511831f2705961
Express the explicit intention of creating bitmaps in GC

Add an explicit flag to PackWriter for allowing the
GC.repack() phase to explicitly generate bitmaps only for the
heads packfile and not for the others.

Previously the bitmap generation was conditioned to the
presence of object ids exclusion from the PackWriter.

The introduction of the bitmap generation in the PackWriter
done in Icdb0cdd66 has accidentally made the .keep files not
completely transparent, because their presence have disabled
the generation of the bitmap index, even if the generation
of bitmaps is enabled.

This bug has been an accidental consequence of the intention
of the bitmap generator to avoid generating bitmaps for the
non-heads packfile, however the implementation done by Colby
decided to use the excludeInPacks variable (see [1]) which
is unfortunately also used for excluding the packfiles having
an associated .keep file (see [2]).

[1] https://git.eclipse.org/r/c/jgit/jgit/+/7940/18/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java#1617
[2] https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/dafcb8f6db82b899c917832768f1c240d273190c/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/GC.java#506

Bug: 582039
Change-Id: Id722e68d9ff4ac24e73bf765ab11017586b6766e
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java