]> source.dussan.org Git - jgit.git/commitdiff
Externalize error message in FileRepository#convertRefStorage 37/154537/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sat, 14 Dec 2019 21:10:12 +0000 (22:10 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 14 Dec 2019 21:10:12 +0000 (22:10 +0100)
Change-Id: I5d3acaa883ee7eb8d244b55b3e708cbe018690c6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java

index 27d3e6aaa3769d61d5fcce56579902bea8b7ae81..c80d6168592db580268c5ad1abc0dc6d134b506b 100644 (file)
@@ -719,6 +719,7 @@ unknownObject=unknown object
 unknownObjectInIndex=unknown object {0} found in index but not in pack file
 unknownObjectType=Unknown object type {0}.
 unknownObjectType2=unknown
+unknownRefStorageFormat=Unknown ref storage format "{0}"
 unknownRepositoryFormat=Unknown repository format
 unknownRepositoryFormat2=Unknown repository format "{0}"; expected "0".
 unknownTransportCommand=unknown command {0}
index 0cea60fd95f62aca438ccaf1bb65cddaaa4880d0..e8ee8b4050ca46f1622bad6ff422e9f46750aac0 100644 (file)
@@ -780,6 +780,7 @@ public class JGitText extends TranslationBundle {
        /***/ public String unknownObjectInIndex;
        /***/ public String unknownObjectType;
        /***/ public String unknownObjectType2;
+       /***/ public String unknownRefStorageFormat;
        /***/ public String unknownRepositoryFormat;
        /***/ public String unknownRepositoryFormat2;
        /***/ public String unknownTransportCommand;
index 2f6ef511338be5b6f846a58821c69fb551a260e5..92d5d24d0b71d38c2dda9d2c9503179e5fd1a7ab 100644 (file)
@@ -788,7 +788,6 @@ public class FileRepository extends Repository {
         * @throws IOException
         *             on I/O problems.
         */
-       @SuppressWarnings("nls")
        public void convertRefStorage(String format, boolean writeLogs,
                        boolean backup) throws IOException {
                if (format.equals("reftable")) { //$NON-NLS-1$
@@ -800,8 +799,8 @@ public class FileRepository extends Repository {
                                convertToPackedRefs(backup);
                        }
                } else {
-                       throw new IOException(String.format(
-                                       "unknown supported ref storage format '%s'", format));
+                       throw new IOException(MessageFormat
+                                       .format(JGitText.get().unknownRefStorageFormat, format));
                }
        }
 }