|
|
@ -45,6 +45,7 @@ package org.eclipse.jgit.pgm; |
|
|
|
|
|
|
|
|
|
|
|
import org.eclipse.jgit.internal.storage.file.FileRepository; |
|
|
|
import org.eclipse.jgit.internal.storage.file.FileRepository; |
|
|
|
import org.kohsuke.args4j.Option; |
|
|
|
import org.kohsuke.args4j.Option; |
|
|
|
|
|
|
|
import org.kohsuke.args4j.spi.ExplicitBooleanOptionHandler; |
|
|
|
|
|
|
|
|
|
|
|
@Command(common = true, usage = "usage_convertRefStorage") |
|
|
|
@Command(common = true, usage = "usage_convertRefStorage") |
|
|
|
class ConvertRefStorage extends TextBuiltin { |
|
|
|
class ConvertRefStorage extends TextBuiltin { |
|
|
@ -52,9 +53,13 @@ class ConvertRefStorage extends TextBuiltin { |
|
|
|
@Option(name = "--format", usage = "usage_convertRefStorageFormat") |
|
|
|
@Option(name = "--format", usage = "usage_convertRefStorageFormat") |
|
|
|
private String format = "reftable"; //$NON-NLS-1$
|
|
|
|
private String format = "reftable"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Option(name = "--backup", handler = ExplicitBooleanOptionHandler.class, aliases = { |
|
|
|
|
|
|
|
"-b" }, usage = "usage_convertRefStorageBackup") |
|
|
|
|
|
|
|
private boolean backup = true; |
|
|
|
|
|
|
|
|
|
|
|
/** {@inheritDoc} */ |
|
|
|
/** {@inheritDoc} */ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void run() throws Exception { |
|
|
|
protected void run() throws Exception { |
|
|
|
((FileRepository) db).convertRefStorage(format, true, true); |
|
|
|
((FileRepository) db).convertRefStorage(format, true, backup); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|