Community
Participate
Working Groups
I found this issue while working on bug 582292 and testing a slightly different scenario where a pushed (and locked) pack file contains an amended commit. Steps to reproduce: 1. clone repository that has at least two commits 2. amend last commit 3. force push changes 4. ensure that .keep file is present for the pushed pack files (create one if needed) 5. run jGit GC Expected result: GC compleats successfully. Actual result: Exception is thrown: java.lang.IllegalStateException at org.eclipse.jgit.internal.storage.file.PackBitmapIndexBuilder.generateStoredEntry(PackBitmapIndexBuilder.java:191) at org.eclipse.jgit.internal.storage.file.PackBitmapIndexBuilder.getCompressedBitmaps(PackBitmapIndexBuilder.java:328) at org.eclipse.jgit.internal.storage.file.PackBitmapIndexWriterV1.writeBitmaps(PackBitmapIndexWriterV1.java:101) at org.eclipse.jgit.internal.storage.file.PackBitmapIndexWriterV1.writeBody(PackBitmapIndexWriterV1.java:91) at org.eclipse.jgit.internal.storage.file.PackBitmapIndexWriterV1.write(PackBitmapIndexWriterV1.java:70) at org.eclipse.jgit.internal.storage.pack.PackWriter.writeBitmapIndex(PackWriter.java:1134) at org.eclipse.jgit.internal.storage.file.GC.writePack(GC.java:1232) at org.eclipse.jgit.internal.storage.file.GC.repack(GC.java:864) at org.eclipse.jgit.internal.storage.file.GC.doGc(GC.java:285) at org.eclipse.jgit.internal.storage.file.GC.gc(GC.java:232) at org.eclipse.jgit.internal.storage.file.GcKeepFilesTest.testKeepFileAllowsBitmapRemapping2(GcKeepFilesTest.java:136)
Reproduction test: https://git.eclipse.org/r/c/jgit/jgit/+/204485