]> source.dussan.org Git - jgit.git/commitdiff
Merge branch 'stable-5.13' into stable-6.0 02/204902/1
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 12 Oct 2023 22:22:11 +0000 (00:22 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 12 Oct 2023 22:26:22 +0000 (00:26 +0200)
* stable-5.13:
  PackConfig: fix @since tags
  Remove unused API problem filters
  Add support for git config repack.packKeptObjects
  Do not exclude objects in locked packs from bitmap processing

Change-Id: Ifeaa4b4f0c5944d4ecd3042be429833ff72b43ed

1  2 
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java

index 571f2613e336fa182368ee52bb3e7c58b96344ed,074728b680e3e499485339631b3aa0e2d7b79720..9a2935f136e164e8e1fc12772db79c0bb408d811
@@@ -51,7 -61,8 +61,8 @@@ public class GcKeepFilesTest extends Gc
                PackFile bitmapFile = singlePack.getPackFile().create(PackExt.BITMAP_INDEX);
                assertTrue(keepFile.exists());
                assertTrue(bitmapFile.delete());
 -              gc.gc();
+               gc.setPackKeptObjects(false);
 +              gc.gc().get();
                stats = gc.getStatistics();
                assertEquals(0, stats.numberOfLooseObjects);
                assertEquals(8, stats.numberOfPackedObjects);
index 584d2bc394ffd9b33fe61a3ead6d1d5d5e5c0456,8b7e3e161faeea5df3bae641604f0ec81c00f8b4..ab8cd1812acd4394a6b13f565cc384d54066b65f
@@@ -175,12 -189,13 +190,14 @@@ public class GarbageCollectCommand exte
                                gc.setProgressMonitor(monitor);
                                if (this.expire != null)
                                        gc.setExpire(expire);
+                               if (this.packKeptObjects != null) {
+                                       gc.setPackKeptObjects(packKeptObjects.booleanValue());
+                               }
                                try {
 -                                      gc.gc();
 +                                      gc.gc().get();
                                        return toProperties(gc.getStatistics());
 -                              } catch (ParseException e) {
 +                              } catch (ParseException | InterruptedException
 +                                              | ExecutionException e) {
                                        throw new JGitInternalException(JGitText.get().gcFailed, e);
                                }
                        } else if (repo instanceof DfsRepository) {