diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-12-14 23:14:50 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-12-15 10:15:49 +0100 |
commit | c2a3ce79654214ba1bd29137e42786dd98bc3e2f (patch) | |
tree | b6443b47ce8d31362dbcb6e10f764d316ea783c0 | |
parent | dbe915def18d9b4dbadfc972d648aaa38462cd17 (diff) | |
download | jgit-c2a3ce79654214ba1bd29137e42786dd98bc3e2f.tar.gz jgit-c2a3ce79654214ba1bd29137e42786dd98bc3e2f.zip |
pgm: add option if reflogs should be written when converting to reftable
Change-Id: Ie1c38121005965e63015d9a2af26a1caa88d73fa
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties | 1 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index bce2892c20..f3e1fe31ba 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -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 diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java index 3f3cd12a0e..d5a23be66f 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java @@ -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); } } |