Browse Source

Move some strings from DfsText to JGitText

Change-Id: I60050e5127d12b6139d81859dba929fcfaabe504
stable-4.9
Dave Borowitz 7 years ago
parent
commit
080b4770e7
  1. 2
      org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
  2. 2
      org.eclipse.jgit/resources/org/eclipse/jgit/internal/storage/dfs/DfsText.properties
  3. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
  4. 10
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java
  5. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsText.java

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

@ -88,6 +88,7 @@ cannotParseDate=The date specification "{0}" could not be parsed with the follow
cannotParseGitURIish=Cannot parse Git URI-ish
cannotPullOnARepoWithState=Cannot pull into a repository with state: {0}
cannotRead=Cannot read {0}
cannotReadBackDelta=Cannot read delta type {0}
cannotReadBlob=Cannot read blob {0}
cannotReadCommit=Cannot read commit {0}
cannotReadFile=Cannot read file {0}
@ -684,6 +685,7 @@ unencodeableFile=Unencodable file: {0}
unexpectedCompareResult=Unexpected metadata comparison result: {0}
unexpectedEndOfConfigFile=Unexpected end of config file
unexpectedEndOfInput=Unexpected end of input
unexpectedEofInPack=Unexpected EOF in partially created pack
unexpectedHunkTrailer=Unexpected hunk trailer
unexpectedOddResult=odd: {0} + {1} - {2}
unexpectedRefReport={0}: unexpected ref report: {1}

2
org.eclipse.jgit/resources/org/eclipse/jgit/internal/storage/dfs/DfsText.properties

@ -1,6 +1,4 @@
cannotReadIndex=Cannot read index {0}
cannotReadBackDelta=Cannot read delta type {0}
shortReadOfBlock=Short read of block at {0} in pack {1}; expected {2} bytes, received only {3}
shortReadOfIndex=Short read of index {0}
unexpectedEofInPack=Unexpected EOF in partially created pack
willNotStoreEmptyPack=Cannot store empty pack

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

@ -147,6 +147,7 @@ public class JGitText extends TranslationBundle {
/***/ public String cannotParseGitURIish;
/***/ public String cannotPullOnARepoWithState;
/***/ public String cannotRead;
/***/ public String cannotReadBackDelta;
/***/ public String cannotReadBlob;
/***/ public String cannotReadCommit;
/***/ public String cannotReadFile;
@ -743,6 +744,7 @@ public class JGitText extends TranslationBundle {
/***/ public String unexpectedCompareResult;
/***/ public String unexpectedEndOfConfigFile;
/***/ public String unexpectedEndOfInput;
/***/ public String unexpectedEofInPack;
/***/ public String unexpectedHunkTrailer;
/***/ public String unexpectedOddResult;
/***/ public String unexpectedRefReport;

10
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java

@ -500,7 +500,7 @@ public class DfsInserter extends ObjectInserter {
inf.setInput(currBuf, s, n);
return n;
}
throw new EOFException(DfsText.get().unexpectedEofInPack);
throw new EOFException(JGitText.get().unexpectedEofInPack);
}
private DfsBlock getOrLoadBlock(long pos) throws IOException {
@ -513,7 +513,7 @@ public class DfsInserter extends ObjectInserter {
for (int p = 0; p < blockSize;) {
int n = out.read(s + p, ByteBuffer.wrap(d, p, blockSize - p));
if (n <= 0)
throw new EOFException(DfsText.get().unexpectedEofInPack);
throw new EOFException(JGitText.get().unexpectedEofInPack);
p += n;
}
b = new DfsBlock(packKey, s, d);
@ -569,13 +569,13 @@ public class DfsInserter extends ObjectInserter {
byte[] buf = buffer();
int cnt = packOut.read(obj.getOffset(), buf, 0, 20);
if (cnt <= 0)
throw new EOFException(DfsText.get().unexpectedEofInPack);
throw new EOFException(JGitText.get().unexpectedEofInPack);
int c = buf[0] & 0xff;
int type = (c >> 4) & 7;
if (type == OBJ_OFS_DELTA || type == OBJ_REF_DELTA)
throw new IOException(MessageFormat.format(
DfsText.get().cannotReadBackDelta, Integer.toString(type)));
JGitText.get().cannotReadBackDelta, Integer.toString(type)));
if (typeHint != OBJ_ANY && type != typeHint) {
throw new IncorrectObjectTypeException(objectId.copy(), typeHint);
}
@ -585,7 +585,7 @@ public class DfsInserter extends ObjectInserter {
int shift = 4;
while ((c & 0x80) != 0) {
if (ptr >= cnt)
throw new EOFException(DfsText.get().unexpectedEofInPack);
throw new EOFException(JGitText.get().unexpectedEofInPack);
c = buf[ptr++] & 0xff;
sz += ((long) (c & 0x7f)) << shift;
shift += 7;

2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsText.java

@ -55,9 +55,7 @@ public class DfsText extends TranslationBundle {
// @formatter:off
/***/ public String cannotReadIndex;
/***/ public String cannotReadBackDelta;
/***/ public String shortReadOfBlock;
/***/ public String shortReadOfIndex;
/***/ public String unexpectedEofInPack;
/***/ public String willNotStoreEmptyPack;
}

Loading…
Cancel
Save