Browse Source

Externalize error message in FileRepository#convertRefStorage

Change-Id: I5d3acaa883ee7eb8d244b55b3e708cbe018690c6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.7
Matthias Sohn 5 years ago
parent
commit
57f22d6db1
  1. 1
      org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
  2. 1
      org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
  3. 5
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java

1
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties

@ -719,6 +719,7 @@ unknownObject=unknown object
unknownObjectInIndex=unknown object {0} found in index but not in pack file unknownObjectInIndex=unknown object {0} found in index but not in pack file
unknownObjectType=Unknown object type {0}. unknownObjectType=Unknown object type {0}.
unknownObjectType2=unknown unknownObjectType2=unknown
unknownRefStorageFormat=Unknown ref storage format "{0}"
unknownRepositoryFormat=Unknown repository format unknownRepositoryFormat=Unknown repository format
unknownRepositoryFormat2=Unknown repository format "{0}"; expected "0". unknownRepositoryFormat2=Unknown repository format "{0}"; expected "0".
unknownTransportCommand=unknown command {0} unknownTransportCommand=unknown command {0}

1
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java

@ -780,6 +780,7 @@ public class JGitText extends TranslationBundle {
/***/ public String unknownObjectInIndex; /***/ public String unknownObjectInIndex;
/***/ public String unknownObjectType; /***/ public String unknownObjectType;
/***/ public String unknownObjectType2; /***/ public String unknownObjectType2;
/***/ public String unknownRefStorageFormat;
/***/ public String unknownRepositoryFormat; /***/ public String unknownRepositoryFormat;
/***/ public String unknownRepositoryFormat2; /***/ public String unknownRepositoryFormat2;
/***/ public String unknownTransportCommand; /***/ public String unknownTransportCommand;

5
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java

@ -788,7 +788,6 @@ public class FileRepository extends Repository {
* @throws IOException * @throws IOException
* on I/O problems. * on I/O problems.
*/ */
@SuppressWarnings("nls")
public void convertRefStorage(String format, boolean writeLogs, public void convertRefStorage(String format, boolean writeLogs,
boolean backup) throws IOException { boolean backup) throws IOException {
if (format.equals("reftable")) { //$NON-NLS-1$ if (format.equals("reftable")) { //$NON-NLS-1$
@ -800,8 +799,8 @@ public class FileRepository extends Repository {
convertToPackedRefs(backup); convertToPackedRefs(backup);
} }
} else { } else {
throw new IOException(String.format( throw new IOException(MessageFormat
"unknown supported ref storage format '%s'", format)); .format(JGitText.get().unknownRefStorageFormat, format));
} }
} }
} }

Loading…
Cancel
Save