]> source.dussan.org Git - jgit.git/commitdiff
pgm: add option if reflogs should be written when converting to reftable 40/154540/3
authorMatthias Sohn <matthias.sohn@sap.com>
Sat, 14 Dec 2019 22:14:50 +0000 (23:14 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 15 Dec 2019 09:15:49 +0000 (10:15 +0100)
Change-Id: Ie1c38121005965e63015d9a2af26a1caa88d73fa
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java

index bce2892c208291115a40f7155730bd7ecdca2717..f3e1fe31bad1278e0481de09cb09345cffdb4a15 100644 (file)
@@ -331,6 +331,7 @@ usage_configureTheServiceInDaemonServicename=configure the service in daemon.ser
 usage_convertRefStorage=Convert ref storage to reftable
 usage_convertRefStorageBackup=Create backup of old ref storage format
 usage_convertRefStorageFormat=Format to convert to (reftable or refdir)
+usage_convertRefStorageRefLogs=Write reflogs to reftable
 usage_createBranchAndCheckout=create branch and check out
 usage_deleteBranchEvenIfNotMerged=delete branch (even if not merged)
 usage_deleteFullyMergedBranch=delete fully merged branch
index 3f3cd12a0e5a49869ae2ad2be1ed5be0c97a15ef..d5a23be66fb41e635e1f91c110f105e3782ad6e4 100644 (file)
@@ -57,9 +57,13 @@ class ConvertRefStorage extends TextBuiltin {
                        "-b" }, usage = "usage_convertRefStorageBackup")
        private boolean backup = true;
 
+       @Option(name = "--reflogs", handler = ExplicitBooleanOptionHandler.class, aliases = {
+                       "-r" }, usage = "usage_convertRefStorageRefLogs")
+       private boolean writeLogs = true;
+
        /** {@inheritDoc} */
        @Override
        protected void run() throws Exception {
-               ((FileRepository) db).convertRefStorage(format, true, backup);
+               ((FileRepository) db).convertRefStorage(format, writeLogs, backup);
        }
 }