]> source.dussan.org Git - jgit.git/commitdiff
Merge branch 'stable-7.0' 56/1203556/1
authorMatthias Sohn <matthias.sohn@sap.com>
Mon, 11 Nov 2024 22:55:18 +0000 (23:55 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Mon, 11 Nov 2024 23:01:17 +0000 (00:01 +0100)
* stable-7.0:
  Replace custom encoder Constants#encodeASCII by JDK implementation
  Replace custom encoder `Constants#encode` by JDK implementation
  Add `numberOfPackFilesAfterBitmap` to RepoStatistics
  Enhance CommitBuilder#parent to tolerate null parent

Change-Id: I46f961144f2e3c4c57ef0f63a9c8954fee8133e9

1  2 
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java

index d8eb751136422dc21e1c2fb17d6e770407cb0c1a,8fde3903d03f2a66b08b93f1be3a2ff6a6c5242a..3df291f11bada21f168421378d811e3ecc124531
@@@ -1509,10 -1509,10 +1509,10 @@@ public class GC 
                public long numberOfPackFiles;
  
                /**
--               * The number of pack files that were created after the last bitmap
++               * The number of pack files that were created since the last bitmap
                 * generation.
                 */
 -              public long numberOfPackFilesAfterBitmap;
 +              public long numberOfPackFilesSinceBitmap;
  
                /**
                 * The number of objects stored as loose objects.
                        ret.numberOfPackedObjects += p.getIndex().getObjectCount();
                        ret.numberOfPackFiles++;
                        ret.sizeOfPackedObjects += p.getPackFile().length();
-                       if (p.getBitmapIndex() != null)
+                       if (p.getBitmapIndex() != null) {
                                ret.numberOfBitmaps += p.getBitmapIndex().getBitmapCount();
-                       else
+                       } else {
 -                              ret.numberOfPackFilesAfterBitmap++;
 +                              ret.numberOfPackFilesSinceBitmap++;
+                       }
                }
                File objDir = repo.getObjectsDirectory();
                String[] fanout = objDir.list();