]> source.dussan.org Git - jgit.git/commitdiff
GarbageCollectCommand: add numberOfBitmaps to statistics 80/185880/5
authorkylezhao <kylezhao@tencent.com>
Tue, 28 Sep 2021 02:48:11 +0000 (10:48 +0800)
committerkylezhao <kylezhao@tencent.com>
Fri, 8 Oct 2021 03:12:31 +0000 (11:12 +0800)
Change-Id: I630afac9408c7313d1cecb1b24476f645c94fc27
Signed-off-by: kylezhao <kylezhao@tencent.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/GarbageCollectCommandTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java

index 623cdde7b725416b56edd203aa9cb4a53b801032..f98db3497b0ad1889a2f571ceb9e4de21f847230 100644 (file)
@@ -39,7 +39,7 @@ public class GarbageCollectCommandTest extends RepositoryTestCase {
                Date expire = GitDateParser.parse("now", null, SystemReader
                                .getInstance().getLocale());
                Properties res = git.gc().setExpire(expire).call();
-               assertTrue(res.size() == 7);
+               assertTrue(res.size() == 8);
        }
 
        @Test
@@ -57,6 +57,6 @@ public class GarbageCollectCommandTest extends RepositoryTestCase {
                                .setExpire(
                                                GitDateParser.parse("now", null, SystemReader
                                                                .getInstance().getLocale())).call();
-               assertTrue(res.size() == 7);
+               assertTrue(res.size() == 8);
        }
 }
index 5ddc16aaaa47638f4baefb60b3943a3d1057e1cb..a7860655618e210103e840e68254c29a37577b3f 100644 (file)
@@ -324,7 +324,7 @@ public class PushCommandTest extends RepositoryTestCase {
 
                        // run a gc to ensure we have a bitmap index
                        Properties res = git1.gc().setExpire(null).call();
-                       assertEquals(7, res.size());
+                       assertEquals(8, res.size());
 
                        // create another commit so we have something else to push
                        writeTrashFile("b", "content of b");
index a2fbd411f60eea87d70cd4045a4ba19af917eebd..b5fff7d6d7139173ac31aec183170efb90d49abb 100644 (file)
@@ -221,6 +221,7 @@ public class GarbageCollectCommand extends GitCommand<Properties> {
        @SuppressWarnings("boxing")
        private static Properties toProperties(RepoStatistics stats) {
                Properties p = new Properties();
+               p.put("numberOfBitmaps", stats.numberOfBitmaps); //$NON-NLS-1$
                p.put("numberOfLooseObjects", stats.numberOfLooseObjects); //$NON-NLS-1$
                p.put("numberOfLooseRefs", stats.numberOfLooseRefs); //$NON-NLS-1$
                p.put("numberOfPackedObjects", stats.numberOfPackedObjects); //$NON-NLS-1$