summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-11-25 17:17:20 +0100
committerRobin Rosenberg <robin.rosenberg@dewire.com>2012-12-27 16:57:38 +0100
commitc310fa0c802f40a774edb58641de3ac5bfad0e2c (patch)
tree28dc002136ce8a2c122e2cb012a317aa7d8a0efa /org.eclipse.jgit.pgm
parent03d50dc50b584caf2826f7db8a4748435b610f63 (diff)
downloadjgit-c310fa0c802f40a774edb58641de3ac5bfad0e2c.tar.gz
jgit-c310fa0c802f40a774edb58641de3ac5bfad0e2c.zip
Mark non-externalizable strings as such
A few classes such as Constanrs are marked with @SuppressWarnings, as are toString() methods with many liternal, but otherwise $NLS-n$ is used for string containing text that should not be translated. A few literals may fall into the gray zone, but mostly I've tried to only tag the obvious ones. Change-Id: I22e50a77e2bf9e0b842a66bdf674e8fa1692f590
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java62
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java16
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java24
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java24
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java10
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java10
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java22
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java10
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java7
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java12
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/eclipse/Ipzilla.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java4
31 files changed, 145 insertions, 146 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
index ed0236b811..e4bca2a496 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
@@ -84,7 +84,7 @@ abstract class AbstractFetchCommand extends TextBuiltin {
shownURI = true;
}
- outw.format(" %c %-17s %-10s -> %s", valueOf(type), longType,
+ outw.format(" %c %-17s %-10s -> %s", valueOf(type), longType, //$NON-NLS-1$
src, dst);
outw.println();
}
@@ -150,18 +150,18 @@ abstract class AbstractFetchCommand extends TextBuiltin {
if (r == RefUpdate.Result.FORCED) {
final String aOld = safeAbbreviate(reader, u.getOldObjectId());
final String aNew = safeAbbreviate(reader, u.getNewObjectId());
- return aOld + "..." + aNew;
+ return aOld + "..." + aNew; //$NON-NLS-1$
}
if (r == RefUpdate.Result.FAST_FORWARD) {
final String aOld = safeAbbreviate(reader, u.getOldObjectId());
final String aNew = safeAbbreviate(reader, u.getNewObjectId());
- return aOld + ".." + aNew;
+ return aOld + ".." + aNew; //$NON-NLS-1$
}
if (r == RefUpdate.Result.NO_CHANGE)
return "[up to date]";
- return "[" + r.name() + "]";
+ return "[" + r.name() + "]"; //$NON-NLS-1$//$NON-NLS-2$
}
private String safeAbbreviate(ObjectReader reader, ObjectId id) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
index 8485ab5f38..365d968aa5 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
@@ -83,7 +83,7 @@ class AmazonS3Client extends TextBuiltin {
protected void run() throws Exception {
final AmazonS3 s3 = new AmazonS3(properties());
- if ("get".equals(op)) {
+ if ("get".equals(op)) { //$NON-NLS-1$
final URLConnection c = s3.get(bucket, key);
int len = c.getContentLength();
final InputStream in = c.getInputStream();
@@ -104,14 +104,14 @@ class AmazonS3Client extends TextBuiltin {
in.close();
}
- } else if ("ls".equals(op) || "list".equals(op)) {
+ } else if ("ls".equals(op) || "list".equals(op)) { //$NON-NLS-1$//$NON-NLS-2$
for (final String k : s3.list(bucket, key))
outw.println(k);
- } else if ("rm".equals(op) || "delete".equals(op)) {
+ } else if ("rm".equals(op) || "delete".equals(op)) { //$NON-NLS-1$ //$NON-NLS-2$
s3.delete(bucket, key);
- } else if ("put".equals(op)) {
+ } else if ("put".equals(op)) { //$NON-NLS-1$
final OutputStream os = s3.beginPut(bucket, key, null, null);
final byte[] tmp = new byte[2048];
int n;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java
index 801e3972fa..341a25b516 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java
@@ -143,16 +143,16 @@ class Blame extends TextBuiltin {
}
if (abbrev == 0)
- abbrev = db.getConfig().getInt("core", "abbrev", 7);
+ abbrev = db.getConfig().getInt("core", "abbrev", 7); //$NON-NLS-1$ //$NON-NLS-2$
if (!showBlankBoundary)
- root = db.getConfig().getBoolean("blame", "blankboundary", false);
+ root = db.getConfig().getBoolean("blame", "blankboundary", false); //$NON-NLS-1$ //$NON-NLS-2$
if (!root)
- root = db.getConfig().getBoolean("blame", "showroot", false);
+ root = db.getConfig().getBoolean("blame", "showroot", false); //$NON-NLS-1$ //$NON-NLS-2$
if (showRawTimestamp)
- dateFmt = new SimpleDateFormat("ZZZZ");
+ dateFmt = new SimpleDateFormat("ZZZZ"); //$NON-NLS-1$
else
- dateFmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ZZZZ");
+ dateFmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ZZZZ"); //$NON-NLS-1$
BlameGenerator generator = new BlameGenerator(db, file);
reader = db.newObjectReader();
@@ -170,7 +170,7 @@ class Blame extends TextBuiltin {
}
generator.reverse(rangeStart, rangeEnd);
} else if (revision != null) {
- generator.push(null, db.resolve(revision + "^{commit}"));
+ generator.push(null, db.resolve(revision + "^{commit}")); //$NON-NLS-1$
} else {
generator.push(null, db.resolve(Constants.HEAD));
if (!db.isBare()) {
@@ -203,12 +203,12 @@ class Blame extends TextBuiltin {
maxSourceLine = Math.max(maxSourceLine, blame.getSourceLine(line));
}
- String pathFmt = MessageFormat.format(" %{0}s", valueOf(pathWidth));
- String numFmt = MessageFormat.format(" %{0}d",
+ String pathFmt = MessageFormat.format(" %{0}s", valueOf(pathWidth)); //$NON-NLS-1$
+ String numFmt = MessageFormat.format(" %{0}d", //$NON-NLS-1$
valueOf(1 + (int) Math.log10(maxSourceLine + 1)));
- String lineFmt = MessageFormat.format(" %{0}d) ",
+ String lineFmt = MessageFormat.format(" %{0}d) ", //$NON-NLS-1$
valueOf(1 + (int) Math.log10(end + 1)));
- String authorFmt = MessageFormat.format(" (%-{0}s %{1}s",
+ String authorFmt = MessageFormat.format(" (%-{0}s %{1}s", //$NON-NLS-1$
valueOf(authorWidth), valueOf(dateWidth));
for (int line = begin; line < end; line++) {
@@ -233,8 +233,8 @@ class Blame extends TextBuiltin {
private void parseLineRangeOption() {
String beginStr, endStr;
- if (rangeString.startsWith("/")) {
- int c = rangeString.indexOf("/,", 1);
+ if (rangeString.startsWith("/")) { //$NON-NLS-1$
+ int c = rangeString.indexOf("/,", 1); //$NON-NLS-1$
if (c < 0) {
beginStr = rangeString;
endStr = String.valueOf(end);
@@ -249,7 +249,7 @@ class Blame extends TextBuiltin {
beginStr = rangeString;
endStr = String.valueOf(end);
} else if (c == 0) {
- beginStr = "0";
+ beginStr = "0"; //$NON-NLS-1$
endStr = rangeString.substring(1);
} else {
beginStr = rangeString.substring(0, c);
@@ -257,20 +257,20 @@ class Blame extends TextBuiltin {
}
}
- if (beginStr.equals(""))
+ if (beginStr.equals("")) //$NON-NLS-1$
begin = 0;
- else if (beginStr.startsWith("/"))
+ else if (beginStr.startsWith("/")) //$NON-NLS-1$
begin = findLine(0, beginStr);
else
begin = Math.max(0, Integer.parseInt(beginStr) - 1);
- if (endStr.equals(""))
+ if (endStr.equals("")) //$NON-NLS-1$
end = blame.getResultContents().size();
- else if (endStr.startsWith("/"))
+ else if (endStr.startsWith("/")) //$NON-NLS-1$
end = findLine(begin, endStr);
- else if (endStr.startsWith("-"))
+ else if (endStr.startsWith("-")) //$NON-NLS-1$
end = begin + Integer.parseInt(endStr);
- else if (endStr.startsWith("+"))
+ else if (endStr.startsWith("+")) //$NON-NLS-1$
end = begin + Integer.parseInt(endStr.substring(1));
else
end = Math.max(0, Integer.parseInt(endStr) - 1);
@@ -278,10 +278,10 @@ class Blame extends TextBuiltin {
private int findLine(int b, String regex) {
String re = regex.substring(1, regex.length() - 1);
- if (!re.startsWith("^"))
- re = ".*" + re;
- if (!re.endsWith("$"))
- re = re + ".*";
+ if (!re.startsWith("^")) //$NON-NLS-1$
+ re = ".*" + re; //$NON-NLS-1$
+ if (!re.endsWith("$")) //$NON-NLS-1$
+ re = re + ".*"; //$NON-NLS-1$
Pattern p = Pattern.compile(re);
RawText text = blame.getResultContents();
for (int line = b; line < text.size(); line++) {
@@ -293,30 +293,30 @@ class Blame extends TextBuiltin {
private String path(int line) {
String p = blame.getSourcePath(line);
- return p != null ? p : "";
+ return p != null ? p : ""; //$NON-NLS-1$
}
private String author(int line) {
PersonIdent author = blame.getSourceAuthor(line);
if (author == null)
- return "";
+ return ""; //$NON-NLS-1$
String name = showAuthorEmail ? author.getEmailAddress() : author
.getName();
- return name != null ? name : "";
+ return name != null ? name : ""; //$NON-NLS-1$
}
private String date(int line) {
if (blame.getSourceCommit(line) == null)
- return "";
+ return ""; //$NON-NLS-1$
PersonIdent author = blame.getSourceAuthor(line);
if (author == null)
- return "";
+ return ""; //$NON-NLS-1$
dateFmt.setTimeZone(author.getTimeZone());
if (!showRawTimestamp)
return dateFmt.format(author.getWhen());
- return String.format("%d %s",
+ return String.format("%d %s", //$NON-NLS-1$
valueOf(author.getWhen().getTime() / 1000L),
dateFmt.format(author.getWhen()));
}
@@ -338,9 +338,9 @@ class Blame extends TextBuiltin {
} else if (!root && commit.getParentCount() == 0) {
if (showLongRevision)
- r = "^" + commit.name().substring(0, OBJECT_ID_STRING_LENGTH - 1);
+ r = "^" + commit.name().substring(0, OBJECT_ID_STRING_LENGTH - 1); //$NON-NLS-1$
else
- r = "^" + reader.abbreviate(commit, abbrev).name();
+ r = "^" + reader.abbreviate(commit, abbrev).name(); //$NON-NLS-1$
} else {
if (showLongRevision)
r = commit.name();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
index c20924d3a6..28e30bcbc2 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
@@ -145,7 +145,7 @@ class Branch extends TextBuiltin {
else
startBranch = Constants.HEAD;
Ref startRef = db.getRef(startBranch);
- ObjectId startAt = db.resolve(startBranch + "^0");
+ ObjectId startAt = db.resolve(startBranch + "^0"); //$NON-NLS-1$
if (startRef != null)
startBranch = startRef.getName();
else
@@ -180,7 +180,7 @@ class Branch extends TextBuiltin {
if (head != null) {
String current = head.getLeaf().getName();
if (current.equals(Constants.HEAD))
- addRef("(no branch)", head);
+ addRef("(no branch)", head); //$NON-NLS-1$
addRefs(refs, Constants.R_HEADS, !remote);
addRefs(refs, Constants.R_REMOTES, remote);
@@ -220,7 +220,7 @@ class Branch extends TextBuiltin {
outw.print(ref);
if (verbose) {
final int spaces = maxNameLength - ref.length() + 1;
- outw.format("%" + spaces + "s", "");
+ outw.format("%" + spaces + "s", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
final ObjectId objectId = refObj.getObjectId();
outw.print(reader.abbreviate(objectId).name());
outw.print(' ');
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
index 31d8ec8e12..ddae66e72c 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
@@ -110,7 +110,7 @@ class Clone extends AbstractFetchCommand {
dst = new FileRepository(gitdir);
dst.create();
final FileBasedConfig dstcfg = dst.getConfig();
- dstcfg.setBoolean("core", null, "bare", false);
+ dstcfg.setBoolean("core", null, "bare", false); //$NON-NLS-1$ //$NON-NLS-2$
dstcfg.save();
db = dst;
@@ -131,8 +131,8 @@ class Clone extends AbstractFetchCommand {
final RemoteConfig rc = new RemoteConfig(dstcfg, remoteName);
rc.addURI(uri);
rc.addFetchRefSpec(new RefSpec().setForceUpdate(true)
- .setSourceDestination(Constants.R_HEADS + "*",
- Constants.R_REMOTES + remoteName + "/*"));
+ .setSourceDestination(Constants.R_HEADS + "*", //$NON-NLS-1$
+ Constants.R_REMOTES + remoteName + "/*")); //$NON-NLS-1$
rc.update(dstcfg);
dstcfg.save();
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
index 700e54118a..2673cc887d 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
@@ -132,7 +132,7 @@ public class CommandCatalog {
private Enumeration<URL> catalogs() {
try {
- final String pfx = "META-INF/services/";
+ final String pfx = "META-INF/services/"; //$NON-NLS-1$
return ldr.getResources(pfx + TextBuiltin.class.getName());
} catch (IOException err) {
return new Vector<URL>().elements();
@@ -143,7 +143,7 @@ public class CommandCatalog {
final BufferedReader cIn;
try {
final InputStream in = cUrl.openStream();
- cIn = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+ cIn = new BufferedReader(new InputStreamReader(in, "UTF-8")); //$NON-NLS-1$
} catch (IOException err) {
// If we cannot read from the service list, go to the next.
//
@@ -153,7 +153,7 @@ public class CommandCatalog {
try {
String line;
while ((line = cIn.readLine()) != null) {
- if (line.length() > 0 && !line.startsWith("#"))
+ if (line.length() > 0 && !line.startsWith("#")) //$NON-NLS-1$
load(line);
}
} catch (IOException err) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
index d76a59b60c..f637abad56 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
@@ -76,13 +76,13 @@ public class CommandRef {
private CommandRef(final Class<? extends TextBuiltin> clazz, final String cn) {
impl = clazz;
name = cn;
- usage = "";
+ usage = ""; //$NON-NLS-1$
}
private static String guessName(final Class<? extends TextBuiltin> clazz) {
final StringBuilder s = new StringBuilder();
- if (clazz.getName().startsWith("org.eclipse.jgit.pgm.debug."))
- s.append("debug-");
+ if (clazz.getName().startsWith("org.eclipse.jgit.pgm.debug.")) //$NON-NLS-1$
+ s.append("debug-"); //$NON-NLS-1$
boolean lastWasDash = true;
for (final char c : clazz.getSimpleName().toCharArray()) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java
index 0963286e9f..a50e744a80 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java
@@ -109,7 +109,7 @@ class Commit extends TextBuiltin {
if (branchName.startsWith(Constants.R_HEADS))
branchName = branchName.substring(Constants.R_HEADS.length());
}
- outw.println("[" + branchName + " " + commit.name() + "] "
+ outw.println("[" + branchName + " " + commit.name() + "] " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ commit.getShortMessage());
}
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java
index cf5539f747..0eb220407a 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java
@@ -103,7 +103,7 @@ class Config extends TextBuiltin {
Set<String> names = config.getNames(section);
for (String name : names) {
for (String value : config.getStringList(section, null, name))
- outw.println(section + "." + name + "=" + value);
+ outw.println(section + "." + name + "=" + value); //$NON-NLS-1$ //$NON-NLS-2$
}
if (names.isEmpty()) {
for (String subsection : config.getSubsections(section)) {
@@ -111,8 +111,8 @@ class Config extends TextBuiltin {
for (String name : names) {
for (String value : config.getStringList(section,
subsection, name))
- outw.println(section + "." + subsection + "."
- + name + "=" + value);
+ outw.println(section + "." + subsection + "." //$NON-NLS-1$ //$NON-NLS-2$
+ + name + "=" + value); //$NON-NLS-1$
}
}
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
index 465df38407..d38c53ac50 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
@@ -161,8 +161,8 @@ class Diff extends TextBuiltin {
@Option(name = "--no-prefix", usage = "usage_noPrefix")
void noPrefix(@SuppressWarnings("unused") boolean on) {
- diffFmt.setOldPrefix("");
- diffFmt.setNewPrefix("");
+ diffFmt.setOldPrefix(""); //$NON-NLS-1$
+ diffFmt.setNewPrefix(""); //$NON-NLS-1$
}
// END -- Options shared with Log
@@ -179,7 +179,7 @@ class Diff extends TextBuiltin {
try {
if (cached) {
if (oldTree == null) {
- ObjectId head = db.resolve(HEAD + "^{tree}");
+ ObjectId head = db.resolve(HEAD + "^{tree}"); //$NON-NLS-1$
if (head == null)
die(MessageFormat.format(CLIText.get().notATree, HEAD));
CanonicalTreeParser p = new CanonicalTreeParser();
@@ -227,21 +227,21 @@ class Diff extends TextBuiltin {
for (DiffEntry ent : files) {
switch (ent.getChangeType()) {
case ADD:
- out.println("A\t" + ent.getNewPath());
+ out.println("A\t" + ent.getNewPath()); //$NON-NLS-1$
break;
case DELETE:
- out.println("D\t" + ent.getOldPath());
+ out.println("D\t" + ent.getOldPath()); //$NON-NLS-1$
break;
case MODIFY:
- out.println("M\t" + ent.getNewPath());
+ out.println("M\t" + ent.getNewPath()); //$NON-NLS-1$
break;
case COPY:
- out.format("C%1$03d\t%2$s\t%3$s", valueOf(ent.getScore()), //
+ out.format("C%1$03d\t%2$s\t%3$s", valueOf(ent.getScore()), // //$NON-NLS-1$
ent.getOldPath(), ent.getNewPath());
out.println();
break;
case RENAME:
- out.format("R%1$03d\t%2$s\t%3$s", valueOf(ent.getScore()), //
+ out.format("R%1$03d\t%2$s\t%3$s", valueOf(ent.getScore()), // //$NON-NLS-1$
ent.getOldPath(), ent.getNewPath());
out.println();
break;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
index ae11f67317..faaf85f76e 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
@@ -104,7 +104,7 @@ class Glog extends RevWalkTextBuiltin {
graphPane.getCommitList().source(walk);
graphPane.getCommitList().fillTo(Integer.MAX_VALUE);
- frame.setTitle("[" + repoName() + "]");
+ frame.setTitle("[" + repoName() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
frame.pack();
frame.setVisible(true);
return graphPane.getCommitList().size();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
index 6ad27ae41a..eaba6e5138 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
@@ -171,8 +171,8 @@ class Log extends RevWalkTextBuiltin {
@Option(name = "--no-prefix", usage = "usage_noPrefix")
void noPrefix(@SuppressWarnings("unused") boolean on) {
- diffFmt.setOldPrefix("");
- diffFmt.setNewPrefix("");
+ diffFmt.setOldPrefix(""); //$NON-NLS-1$
+ diffFmt.setNewPrefix(""); //$NON-NLS-1$
}
// END -- Options shared with Diff
@@ -238,18 +238,18 @@ class Log extends RevWalkTextBuiltin {
@Override
protected void show(final RevCommit c) throws Exception {
outw.print(CLIText.get().commitLabel);
- outw.print(" ");
+ outw.print(" "); //$NON-NLS-1$
c.getId().copyTo(outbuffer, outw);
if (decorate) {
Collection<Ref> list = allRefsByPeeledObjectId.get(c);
if (list != null) {
- outw.print(" (");
+ outw.print(" ("); //$NON-NLS-1$
for (Iterator<Ref> i = list.iterator(); i.hasNext(); ) {
outw.print(i.next().getName());
if (i.hasNext())
- outw.print(" ");
+ outw.print(" "); //$NON-NLS-1$
}
- outw.print(")");
+ outw.print(")"); //$NON-NLS-1$
}
}
outw.println();
@@ -260,9 +260,9 @@ class Log extends RevWalkTextBuiltin {
dateFormatter.formatDate(author)));
outw.println();
- final String[] lines = c.getFullMessage().split("\n");
+ final String[] lines = c.getFullMessage().split("\n"); //$NON-NLS-1$
for (final String s : lines) {
- outw.print(" ");
+ outw.print(" "); //$NON-NLS-1$
outw.print(s);
outw.println();
}
@@ -324,16 +324,16 @@ class Log extends RevWalkTextBuiltin {
outw.println();
outw.print("Notes");
if (label != null) {
- outw.print(" (");
+ outw.print(" ("); //$NON-NLS-1$
outw.print(label);
- outw.print(")");
+ outw.print(")"); //$NON-NLS-1$
}
- outw.println(":");
+ outw.println(":"); //$NON-NLS-1$
try {
RawText rawText = new RawText(argWalk.getObjectReader()
.open(blobId).getCachedBytes(Integer.MAX_VALUE));
for (int i = 0; i < rawText.size(); i++) {
- outw.print(" ");
+ outw.print(" "); //$NON-NLS-1$
outw.println(rawText.getString(i));
}
} catch (LargeObjectException e) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
index d59451c55e..282c79d162 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
@@ -71,7 +71,7 @@ class LsRemote extends TextBuiltin {
for (final Ref r : c.getRefs()) {
show(r.getObjectId(), r.getName());
if (r.getPeeledObjectId() != null)
- show(r.getPeeledObjectId(), r.getName() + "^{}");
+ show(r.getPeeledObjectId(), r.getName() + "^{}"); //$NON-NLS-1$
}
} finally {
c.close();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
index 6c5cd2767c..0d72e639a8 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -128,7 +128,7 @@ public class Main {
&& err instanceof TransportException)
System.err.println(MessageFormat.format(CLIText.get().fatalError, err.getCause().getMessage()));
- if (err.getClass().getName().startsWith("org.eclipse.jgit.errors.")) {
+ if (err.getClass().getName().startsWith("org.eclipse.jgit.errors.")) { //$NON-NLS-1$
System.err.println(MessageFormat.format(CLIText.get().fatalError, err.getMessage()));
if (showStackTrace)
err.printStackTrace();
@@ -163,7 +163,7 @@ public class Main {
if (argv.length == 0 || help) {
final String ex = clp.printExample(ExampleMode.ALL, CLIText.get().resourceBundle());
- writer.println("jgit" + ex + " command [ARG ...]");
+ writer.println("jgit" + ex + " command [ARG ...]"); //$NON-NLS-1$
if (help) {
writer.println();
clp.printUsage(writer, CLIText.get().resourceBundle());
@@ -226,8 +226,8 @@ public class Main {
private static boolean installConsole() {
try {
- install("org.eclipse.jgit.console.ConsoleAuthenticator");
- install("org.eclipse.jgit.console.ConsoleCredentialsProvider");
+ install("org.eclipse.jgit.console.ConsoleAuthenticator"); //$NON-NLS-1$
+ install("org.eclipse.jgit.console.ConsoleCredentialsProvider"); //$NON-NLS-1$
return true;
} catch (ClassNotFoundException e) {
return false;
@@ -253,7 +253,7 @@ public class Main {
throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException, ClassNotFoundException {
try {
- Class.forName(name).getMethod("install").invoke(null);
+ Class.forName(name).getMethod("install").invoke(null); //$NON-NLS-1$
} catch (InvocationTargetException e) {
if (e.getCause() instanceof RuntimeException)
throw (RuntimeException) e.getCause();
@@ -276,23 +276,23 @@ public class Main {
* the value in <code>http_proxy</code> is unsupportable.
*/
private static void configureHttpProxy() throws MalformedURLException {
- final String s = System.getenv("http_proxy");
- if (s == null || s.equals(""))
+ final String s = System.getenv("http_proxy"); //$NON-NLS-1$
+ if (s == null || s.equals("")) //$NON-NLS-1$
return;
- final URL u = new URL((s.indexOf("://") == -1) ? "http://" + s : s);
- if (!"http".equals(u.getProtocol()))
+ final URL u = new URL((s.indexOf("://") == -1) ? "http://" + s : s); //$NON-NLS-1$ //$NON-NLS-2$
+ if (!"http".equals(u.getProtocol())) //$NON-NLS-1$
throw new MalformedURLException(MessageFormat.format(CLIText.get().invalidHttpProxyOnlyHttpSupported, s));
final String proxyHost = u.getHost();
final int proxyPort = u.getPort();
- System.setProperty("http.proxyHost", proxyHost);
+ System.setProperty("http.proxyHost", proxyHost); //$NON-NLS-1$
if (proxyPort > 0)
- System.setProperty("http.proxyPort", String.valueOf(proxyPort));
+ System.setProperty("http.proxyPort", String.valueOf(proxyPort)); //$NON-NLS-1$
final String userpass = u.getUserInfo();
- if (userpass != null && userpass.contains(":")) {
+ if (userpass != null && userpass.contains(":")) { //$NON-NLS-1$
final int c = userpass.indexOf(':');
final String user = userpass.substring(0, c);
final String pass = userpass.substring(c + 1);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
index 6fe68810a1..7eaa5fa351 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
@@ -103,7 +103,7 @@ class Merge extends TextBuiltin {
// determine the other revision we want to merge with HEAD
final Ref srcRef = db.getRef(ref);
- final ObjectId src = db.resolve(ref + "^{commit}");
+ final ObjectId src = db.resolve(ref + "^{commit}"); //$NON-NLS-1$
if (src == null)
throw die(MessageFormat.format(
CLIText.get().refDoesNotExistOrNoCommit, ref));
@@ -144,11 +144,11 @@ class Merge extends TextBuiltin {
case DIRTY_WORKTREE:
case DIRTY_INDEX:
outw.println(CLIText.get().dontOverwriteLocalChanges);
- outw.println(" " + entry.getKey());
+ outw.println(" " + entry.getKey()); //$NON-NLS-1$
break;
case COULD_NOT_DELETE:
outw.println(CLIText.get().cannotDeleteFile);
- outw.println(" " + entry.getKey());
+ outw.println(" " + entry.getKey()); //$NON-NLS-1$
break;
}
break;
@@ -157,7 +157,7 @@ class Merge extends TextBuiltin {
if (!isMergedInto(oldHead, src))
name = mergeStrategy.getName();
else
- name = "recursive";
+ name = "recursive"; //$NON-NLS-1$
outw.println(MessageFormat.format(CLIText.get().mergeMadeBy, name));
break;
case MERGED_SQUASHED:
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
index 534e6de250..8239c96d4c 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
@@ -194,7 +194,7 @@ class Push extends TextBuiltin {
final char flag = fastForward ? ' ' : '+';
final String summary = safeAbbreviate(reader, oldRef
.getObjectId())
- + (fastForward ? ".." : "...")
+ + (fastForward ? ".." : "...") //$NON-NLS-1$ //$NON-NLS-2$
+ safeAbbreviate(reader, rru.getNewObjectId());
final String message = fastForward ? null : CLIText.get().forcedUpdate;
printUpdateLine(flag, summary, srcRef, remoteName, message);
@@ -252,14 +252,14 @@ class Push extends TextBuiltin {
private void printUpdateLine(final char flag, final String summary,
final String srcRef, final String destRef, final String message)
throws IOException {
- outw.format(" %c %-17s", valueOf(flag), summary);
+ outw.format(" %c %-17s", valueOf(flag), summary); //$NON-NLS-1$
if (srcRef != null)
- outw.format(" %s ->", abbreviateRef(srcRef, true));
- outw.format(" %s", abbreviateRef(destRef, true));
+ outw.format(" %s ->", abbreviateRef(srcRef, true)); //$NON-NLS-1$
+ outw.format(" %s", abbreviateRef(destRef, true)); //$NON-NLS-1$
if (message != null)
- outw.format(" (%s)", message);
+ outw.format(" (%s)", message); //$NON-NLS-1$
outw.println();
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java
index 4d877acd5c..4ac7ade537 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java
@@ -73,14 +73,14 @@ class Reflog extends TextBuiltin {
private String toString(ReflogEntry entry, int i) {
final StringBuilder s = new StringBuilder();
s.append(entry.getNewId().abbreviate(7).name());
- s.append(" ");
+ s.append(" "); //$NON-NLS-1$
s.append(ref == null ? Constants.HEAD : Repository.shortenRefName(ref));
- s.append("@{" + i + "}:");
- s.append(" ");
+ s.append("@{" + i + "}:"); //$NON-NLS-1$ //$NON-NLS-2$
+ s.append(" "); //$NON-NLS-1$
// temporary workaround for bug 393463
if (entry.getOldId().equals(ObjectId.zeroId()))
- s.append(entry.getComment().replaceFirst("^commit:",
- "commit (initial):"));
+ s.append(entry.getComment().replaceFirst("^commit:", //$NON-NLS-1$
+ "commit (initial):")); //$NON-NLS-1$
else
s.append(entry.getComment());
return s.toString();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
index 13dad7a9a0..7d6a1713bc 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
@@ -154,14 +154,14 @@ class Show extends TextBuiltin {
@Option(name = "--no-prefix", usage = "usage_noPrefix")
void noPrefix(@SuppressWarnings("unused") boolean on) {
- diffFmt.setOldPrefix("");
- diffFmt.setNewPrefix("");
+ diffFmt.setOldPrefix(""); //$NON-NLS-1$
+ diffFmt.setNewPrefix(""); //$NON-NLS-1$
}
// END -- Options shared with Diff
Show() {
- fmt = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy ZZZZZ", Locale.US);
+ fmt = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy ZZZZZ", Locale.US); //$NON-NLS-1$
}
@SuppressWarnings("boxing")
@@ -198,7 +198,7 @@ class Show extends TextBuiltin {
break;
case Constants.OBJ_TREE:
- outw.print("tree ");
+ outw.print("tree "); //$NON-NLS-1$
outw.print(objectName);
outw.println();
outw.println();
@@ -225,7 +225,7 @@ class Show extends TextBuiltin {
private void show(RevTag tag) throws IOException {
outw.print(CLIText.get().tagLabel);
- outw.print(" ");
+ outw.print(" "); //$NON-NLS-1$
outw.print(tag.getTagName());
outw.println();
@@ -241,9 +241,9 @@ class Show extends TextBuiltin {
}
outw.println();
- final String[] lines = tag.getFullMessage().split("\n");
+ final String[] lines = tag.getFullMessage().split("\n"); //$NON-NLS-1$
for (final String s : lines) {
- outw.print(" ");
+ outw.print(" "); //$NON-NLS-1$
outw.print(s);
outw.println();
}
@@ -261,7 +261,7 @@ class Show extends TextBuiltin {
outw.print(walk.getPathString());
final FileMode mode = walk.getFileMode(0);
if (mode == FileMode.TREE)
- outw.print("/");
+ outw.print("/"); //$NON-NLS-1$
outw.println();
}
}
@@ -270,7 +270,7 @@ class Show extends TextBuiltin {
char[] outbuffer = new char[Constants.OBJECT_ID_LENGTH * 2];
outw.print(CLIText.get().commitLabel);
- outw.print(" ");
+ outw.print(" "); //$NON-NLS-1$
c.getId().copyTo(outbuffer, outw);
outw.println();
@@ -284,9 +284,9 @@ class Show extends TextBuiltin {
fmt.format(author.getWhen())));
outw.println();
- final String[] lines = c.getFullMessage().split("\n");
+ final String[] lines = c.getFullMessage().split("\n"); //$NON-NLS-1$
for (final String s : lines) {
- outw.print(" ");
+ outw.print(" "); //$NON-NLS-1$
outw.print(s);
outw.println();
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
index 3e0f661097..2c621ac897 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
@@ -60,7 +60,7 @@ class ShowRef extends TextBuiltin {
for (final Ref r : getSortedRefs()) {
show(r.getObjectId(), r.getName());
if (r.getPeeledObjectId() != null)
- show(r.getPeeledObjectId(), r.getName() + "^{}");
+ show(r.getPeeledObjectId(), r.getName() + "^{}"); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
index 6abbfb0354..4d2308e214 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
@@ -99,7 +99,7 @@ class Status extends TextBuiltin {
int nbNotStagedForCommit = notStagedForCommit.size();
if (nbNotStagedForCommit > 0) {
if (!firstHeader)
- printSectionHeader("");
+ printSectionHeader(""); //$NON-NLS-1$
printSectionHeader(CLIText.get().changesNotStagedForCommit);
printList(CLIText.get().statusModified,
CLIText.get().statusRemoved, null, notStagedForCommit,
@@ -109,7 +109,7 @@ class Status extends TextBuiltin {
int nbUnmerged = unmerged.size();
if (nbUnmerged > 0) {
if (!firstHeader)
- printSectionHeader("");
+ printSectionHeader(""); //$NON-NLS-1$
printSectionHeader(CLIText.get().unmergedPaths);
printList(unmerged);
firstHeader = false;
@@ -117,7 +117,7 @@ class Status extends TextBuiltin {
int nbUntracked = untracked.size();
if (nbUntracked > 0) {
if (!firstHeader)
- printSectionHeader("");
+ printSectionHeader(""); //$NON-NLS-1$
printSectionHeader(CLIText.get().untrackedFiles);
printList(untracked);
}
@@ -127,8 +127,8 @@ class Status extends TextBuiltin {
throws IOException {
outw.println(CLIText.formatLine(MessageFormat
.format(pattern, arguments)));
- if (!pattern.equals(""))
- outw.println(CLIText.formatLine(""));
+ if (!pattern.equals("")) //$NON-NLS-1$
+ outw.println(CLIText.formatLine("")); //$NON-NLS-1$
outw.flush();
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java
index 665b79dfa0..23a16ab746 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java
@@ -68,7 +68,7 @@ class Tag extends TextBuiltin {
private boolean force;
@Option(name = "-m", metaVar = "metaVar_message", usage = "usage_tagMessage")
- private String message = "";
+ private String message = ""; //$NON-NLS-1$
@Argument(index = 0, metaVar = "metaVar_name")
private String tagName;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
index 87437107d8..c4e89c3430 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
@@ -134,8 +134,7 @@ public abstract class TextBuiltin {
protected void init(final Repository repository, final String gitDir) {
try {
final String outputEncoding = repository != null ? repository
- .getConfig()
- .getString("i18n", null, "logOutputEncoding") : null;
+ .getConfig().getString("i18n", null, "logOutputEncoding") : null; //$NON-NLS-1$ //$NON-NLS-2$
if (outs == null)
outs = new FileOutputStream(FileDescriptor.out);
BufferedWriter bufw;
@@ -208,7 +207,7 @@ public abstract class TextBuiltin {
* @param clp
*/
public void printUsageAndExit(final CmdLineParser clp) {
- printUsageAndExit("", clp);
+ printUsageAndExit("", clp); //$NON-NLS-1$
}
/**
@@ -220,7 +219,7 @@ public abstract class TextBuiltin {
public void printUsageAndExit(final String message, final CmdLineParser clp) {
PrintWriter writer = new PrintWriter(System.err);
writer.println(message);
- writer.print("jgit ");
+ writer.print("jgit "); //$NON-NLS-1$
writer.print(commandName);
clp.printSingleLineUsage(writer, getResourceBundle());
writer.println();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
index 2a67b389ed..663f16c6e4 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
@@ -260,11 +260,11 @@ class DiffAlgorithms extends TextBuiltin {
"Algorithm", "Time(ns)", "Time(ns) on", "Time(ns) on");
outw.format("%-25s %12s ( %12s %12s )\n", //
"", "", "N=" + minN, "N=" + maxN);
- outw.println("-----------------------------------------------------"
- + "----------------");
+ outw.println("-----------------------------------------------------" //$NON-NLS-1$
+ + "----------------"); //$NON-NLS-1$
for (Test test : all) {
- outw.format("%-25s %12d ( %12d %12d )", //
+ outw.format("%-25s %12d ( %12d %12d )", // //$NON-NLS-1$
test.algorithm.name, //
valueOf(test.runningTimeNanos), //
valueOf(test.minN.runningTimeNanos), //
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java
index 9f6bcda2a1..ab4ec2f72b 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java
@@ -59,7 +59,7 @@ class ReadDirCache extends TextBuiltin {
for (int i = 0; i < cnt; i++)
db.readDirCache();
final long end = System.currentTimeMillis();
- outw.print(" ");
+ outw.print(" "); //$NON-NLS-1$
outw.println(MessageFormat.format(CLIText.get().averageMSPerRead,
valueOf((end - start) / cnt)));
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
index b01734e00a..7f1e332ff9 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
@@ -95,7 +95,7 @@ import org.kohsuke.args4j.Option;
* <p>
*/
class RebuildCommitGraph extends TextBuiltin {
- private static final String REALLY = "--destroy-this-repository";
+ private static final String REALLY = "--destroy-this-repository"; //$NON-NLS-1$
@Option(name = REALLY, usage = "usage_approveDestructionOfRepository")
boolean really;
@@ -138,7 +138,7 @@ class RebuildCommitGraph extends TextBuiltin {
try {
String line;
while ((line = br.readLine()) != null) {
- final String[] parts = line.split("[ \t]{1,}");
+ final String[] parts = line.split("[ \t]{1,}"); //$NON-NLS-1$
final ObjectId oldId = ObjectId.fromString(parts[0]);
try {
rw.parseCommit(oldId);
@@ -165,8 +165,8 @@ class RebuildCommitGraph extends TextBuiltin {
pm.beginTask("Rewriting commits", queue.size());
final ObjectInserter oi = db.newObjectInserter();
final ObjectId emptyTree = oi.insert(Constants.OBJ_TREE, new byte[] {});
- final PersonIdent me = new PersonIdent("jgit rebuild-commitgraph",
- "rebuild-commitgraph@localhost");
+ final PersonIdent me = new PersonIdent("jgit rebuild-commitgraph", //$NON-NLS-1$
+ "rebuild-commitgraph@localhost"); //$NON-NLS-1$
while (!queue.isEmpty()) {
final ListIterator<ToRewrite> itr = queue
.listIterator(queue.size());
@@ -196,7 +196,7 @@ class RebuildCommitGraph extends TextBuiltin {
newc.setAuthor(new PersonIdent(me, new Date(t.commitTime)));
newc.setCommitter(newc.getAuthor());
newc.setParentIds(newParents);
- newc.setMessage("ORIGINAL " + t.oldId.name() + "\n");
+ newc.setMessage("ORIGINAL " + t.oldId.name() + "\n"); //$NON-NLS-2$
t.newId = oi.insert(newc);
rewrites.put(t.oldId, t.newId);
pm.update(1);
@@ -277,7 +277,7 @@ class RebuildCommitGraph extends TextBuiltin {
try {
String line;
while ((line = br.readLine()) != null) {
- final String[] parts = line.split("[ \t]{1,}");
+ final String[] parts = line.split("[ \t]{1,}"); //$NON-NLS-1$
final ObjectId origId = ObjectId.fromString(parts[0]);
final String type = parts[1];
final String name = parts[2];
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
index e96e6543c6..a0b461d4ee 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
@@ -103,7 +103,7 @@ class ShowCommands extends TextBuiltin {
final ClassLoader ldr = c.getImplementationClassLoader();
String cn = c.getImplementationClassName();
- cn = cn.replace('.', '/') + ".class";
+ cn = cn.replace('.', '/') + ".class"; //$NON-NLS-1$
final URL url = ldr.getResource(cn);
if (url == null) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java
index 040b2e50e7..e69738c09f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java
@@ -71,7 +71,7 @@ class ShowDirCache extends TextBuiltin {
final int stage = ent.getStage();
outw.print(mode);
- outw.format(" %6d", valueOf(len));
+ outw.format(" %6d", valueOf(len)); //$NON-NLS-1$
outw.print(' ');
outw.print(fmt.format(mtime));
outw.print(' ');
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
index df7058f138..e2da0d5fce 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
@@ -347,19 +347,19 @@ class TextHashFunctions extends TextBuiltin {
File parent = db.getDirectory().getParentFile();
if (name.equals(Constants.DOT_GIT) && parent != null)
name = parent.getName();
- outw.println(name + ":");
+ outw.println(name + ":"); //$NON-NLS-1$
}
outw.format(" %6d files; %5d avg. unique lines/file\n", //
valueOf(fileCnt), //
valueOf(lineCnt / fileCnt));
outw.format("%-20s %-15s %9s\n", "Hash", "Fold", "Max Len");
- outw.println("-----------------------------------------------");
+ outw.println("-----------------------------------------------"); //$NON-NLS-1$
String lastHashName = null;
for (Function fun : all) {
String hashName = fun.hash.name;
if (hashName.equals(lastHashName))
- hashName = "";
- outw.format("%-20s %-15s %9d\n", //
+ hashName = ""; //$NON-NLS-1$
+ outw.format("%-20s %-15s %9d\n", // //$NON-NLS-1$
hashName, //
fun.fold.name, //
valueOf(fun.maxChainLength));
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/eclipse/Ipzilla.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/eclipse/Ipzilla.java
index 6653209a65..a6ec91408d 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/eclipse/Ipzilla.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/eclipse/Ipzilla.java
@@ -59,7 +59,7 @@ import org.kohsuke.args4j.Option;
@Command(name = "eclipse-ipzilla", common = false, usage = "usage_synchronizeIPZillaData")
class Ipzilla extends TextBuiltin {
@Option(name = "--url", metaVar = "metaVar_url", usage = "usage_IPZillaURL")
- private String url = "https://dev.eclipse.org/ipzilla/";
+ private String url = "https://dev.eclipse.org/ipzilla/"; //$NON-NLS-1$
@Option(name = "--username", metaVar = "metaVar_user", usage = "usage_IPZillaUsername")
private String username;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java
index b14130f4aa..cea32099e2 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java
@@ -127,13 +127,13 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser {
final ArrayList<String> tmp = new ArrayList<String>(args.length);
for (int argi = 0; argi < args.length; argi++) {
final String str = args[argi];
- if (str.equals("--")) {
+ if (str.equals("--")) { //$NON-NLS-1$
while (argi < args.length)
tmp.add(args[argi++]);
break;
}
- if (str.startsWith("--")) {
+ if (str.startsWith("--")) { //$NON-NLS-1$
final int eq = str.indexOf('=');
if (eq > 0) {
tmp.add(str.substring(0, eq));
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
index bf1753634c..4d917dcbd3 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
@@ -88,12 +88,12 @@ public class RevCommitHandler extends OptionHandler<RevCommit> {
String name = params.getParameter(0);
boolean interesting = true;
- if (name.startsWith("^")) {
+ if (name.startsWith("^")) { //$NON-NLS-1$
name = name.substring(1);
interesting = false;
}
- final int dot2 = name.indexOf("..");
+ final int dot2 = name.indexOf(".."); //$NON-NLS-1$
if (dot2 != -1) {
if (!option.isMultiValued())
throw new CmdLineException(MessageFormat.format(CLIText.get().onlyOneMetaVarExpectedIn