From 53dd9a9e4bc5ae325a70387882cdd38a71c8deca Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Sun, 6 Aug 2017 12:35:17 -0700 Subject: [PATCH] Rename extensions.refsStorage to refStorage This matches the proposal that has been discussed at length on git-core mailing list and seems to be the accepted convention. Change-Id: I9f6ab15144826893d1e2a4b48a2d657d6dd445ec --- .../resources/org/eclipse/jgit/pgm/internal/CLIText.properties | 2 +- .../src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java | 2 +- .../internal/storage/reftree/LocalDiskRefTreeDatabaseTest.java | 2 +- .../org/eclipse/jgit/internal/storage/file/FileRepository.java | 2 +- 4 files changed, 4 insertions(+), 4 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 8666c3429..7c9816cf7 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 @@ -257,7 +257,7 @@ usage_PrunePreserved=Remove the preserved subdirectory containing previously pre usage_ReadDirCache= Read the DirCache 100 times usage_RebuildCommitGraph=Recreate a repository from another one's commit graph usage_RebuildRefTree=Copy references into a RefTree -usage_RebuildRefTreeEnable=set extensions.refsStorage = reftree +usage_RebuildRefTreeEnable=set extensions.refStorage = reftree usage_Remote=Manage set of tracked repositories usage_RepositoryToReadFrom=Repository to read from usage_RepositoryToReceiveInto=Repository to receive into diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java index 57345e20d..8cde5138a 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java @@ -133,7 +133,7 @@ class RebuildRefTree extends TextBuiltin { if (enable && !(db.getRefDatabase() instanceof RefTreeDatabase)) { StoredConfig cfg = db.getConfig(); cfg.setInt("core", null, "repositoryformatversion", 1); //$NON-NLS-1$ //$NON-NLS-2$ - cfg.setString("extensions", null, "refsStorage", "reftree"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + cfg.setString("extensions", null, "refStorage", "reftree"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ cfg.save(); errw.println("Enabled reftree."); //$NON-NLS-1$ errw.flush(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/LocalDiskRefTreeDatabaseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/LocalDiskRefTreeDatabaseTest.java index 67a781990..d5a07e02f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/LocalDiskRefTreeDatabaseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/LocalDiskRefTreeDatabaseTest.java @@ -83,7 +83,7 @@ public class LocalDiskRefTreeDatabaseTest extends LocalDiskRepositoryTestCase { FileRepository init = createWorkRepository(); FileBasedConfig cfg = init.getConfig(); cfg.setInt("core", null, "repositoryformatversion", 1); - cfg.setString("extensions", null, "refsStorage", "reftree"); + cfg.setString("extensions", null, "refStorage", "reftree"); cfg.save(); repo = (FileRepository) new FileRepositoryBuilder() diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java index 6a674aa65..646feac8c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java @@ -216,7 +216,7 @@ public class FileRepository extends Repository { ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION, 0); String reftype = repoConfig.getString( - "extensions", null, "refsStorage"); //$NON-NLS-1$ //$NON-NLS-2$ + "extensions", null, "refStorage"); //$NON-NLS-1$ //$NON-NLS-2$ if (repositoryFormatVersion >= 1 && reftype != null) { if (StringUtils.equalsIgnoreCase(reftype, "reftree")) { //$NON-NLS-1$ refs = new RefTreeDatabase(this, new RefDirectory(this));