diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-05 10:53:12 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-05 10:53:28 +0900 |
commit | 60b43c03e218a7c94257105820b790e8dbc0ab6f (patch) | |
tree | 1a20e432b793eba2c97357d3603d100f1ff48a22 /org.eclipse.jgit.lfs.server.test/tst | |
parent | 28167853c120540db97a5c092646d0ed3316e1e8 (diff) | |
download | jgit-60b43c03e218a7c94257105820b790e8dbc0ab6f.tar.gz jgit-60b43c03e218a7c94257105820b790e8dbc0ab6f.zip |
Add ConfigConstants.CONFIG_SECTION_LFS
DirCacheCheckout has a warning about non-localised string "lfs". Other
classes use org.eclipse.jgit.lfs.lib.Constants but that is not visible
to DirCacheCheckout.
Add a new constant in ConfigConstants and use that in DirCacheCheckout.
Replace existing uses of org.eclipse.jgit.lfs.lib.Constants.LFS with
the new constant, except where it is referring to the folder name.
Change-Id: I0f21b951babff9a2e579d68c4de0c62ee4bc23d4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.server.test/tst')
-rw-r--r-- | org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/CheckoutTest.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/CheckoutTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/CheckoutTest.java index 67c8bd267c..fb6225b1c1 100644 --- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/CheckoutTest.java +++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/CheckoutTest.java @@ -53,7 +53,6 @@ import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.junit.JGitTestUtil; import org.eclipse.jgit.junit.TestRepository; import org.eclipse.jgit.lfs.BuiltinLFS; -import org.eclipse.jgit.lfs.lib.Constants; import org.eclipse.jgit.lfs.lib.LongObjectId; import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.Repository; @@ -81,11 +80,13 @@ public class CheckoutTest extends LfsServerTest { .create(tmp.resolve(".git").toFile()); db.create(); StoredConfig cfg = db.getConfig(); - cfg.setBoolean(ConfigConstants.CONFIG_FILTER_SECTION, Constants.LFS, + cfg.setBoolean(ConfigConstants.CONFIG_FILTER_SECTION, + ConfigConstants.CONFIG_SECTION_LFS, ConfigConstants.CONFIG_KEY_USEJGITBUILTIN, true); - cfg.setBoolean(ConfigConstants.CONFIG_FILTER_SECTION, Constants.LFS, + cfg.setBoolean(ConfigConstants.CONFIG_FILTER_SECTION, + ConfigConstants.CONFIG_SECTION_LFS, ConfigConstants.CONFIG_KEY_REQUIRED, false); - cfg.setString(Constants.LFS, null, "url", + cfg.setString(ConfigConstants.CONFIG_SECTION_LFS, null, "url", server.getURI().toString() + "/lfs"); cfg.save(); @@ -122,7 +123,8 @@ public class CheckoutTest extends LfsServerTest { @Test(expected = JGitInternalException.class) public void testUnknownContentRequired() throws Exception { StoredConfig cfg = tdb.getRepository().getConfig(); - cfg.setBoolean(ConfigConstants.CONFIG_FILTER_SECTION, Constants.LFS, + cfg.setBoolean(ConfigConstants.CONFIG_FILTER_SECTION, + ConfigConstants.CONFIG_SECTION_LFS, ConfigConstants.CONFIG_KEY_REQUIRED, true); cfg.save(); |