summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2018-09-05 17:52:37 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2018-09-05 17:52:44 +0200
commit771ca345e5cd8e5e115afc85b9c7a80246631bc1 (patch)
treee483cc8a9c7fd6c13137cda818c81d0b48e3afd4 /org.eclipse.jgit.pgm
parentb6f3bdefce01680be8089e3732d143d7e1059b46 (diff)
parent2173f441589fbab7214bf59ea1330fff2c9f4c37 (diff)
downloadjgit-771ca345e5cd8e5e115afc85b9c7a80246631bc1.tar.gz
jgit-771ca345e5cd8e5e115afc85b9c7a80246631bc1.zip
Merge branch 'master' into stable-5.1
* master: UploadPackTest: Avoid unnecessarily boxing int into Integer Parse signature of GPG-signed commits Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8 Simplify file creation in ResetCommandTest Specify charset when constructing InputStreamReader Update Orbit to S20180829155938 for 2018-09 RC1 Replace useminimalnegotation flag with maxhaves flag Extract protocol v2 fetch request parsing to its own class FetchV2Request: Rename shallowSince to deepenSince FetchV2Request: Correct typo in parameter name FetchV2Request round up (doneReceived, renamings) Use right variable in error message about depth UploadPack: avoid conflating shallow commit lists in protocol v2 Bazel: Use hyphen instead of underscore in external repository names Format BUILD files with buildifier 0.15.0 Upgrade maven-compiler-plugin to 3.8.0 Change-Id: Ibc6feb828e4ff20a3158e6b75dcfce7617e00b0e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java6
5 files changed, 13 insertions, 11 deletions
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 2b0e5a717d..dbdccc10e2 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
@@ -43,7 +43,7 @@
package org.eclipse.jgit.pgm;
-import static org.eclipse.jgit.lib.Constants.CHARSET;
+import static java.nio.charset.StandardCharsets.UTF_8;
import java.io.BufferedReader;
import java.io.IOException;
@@ -148,7 +148,7 @@ public class CommandCatalog {
private void scan(URL cUrl) {
try (BufferedReader cIn = new BufferedReader(
- new InputStreamReader(cUrl.openStream(), CHARSET))) {
+ new InputStreamReader(cUrl.openStream(), UTF_8))) {
String line;
while ((line = cIn.readLine()) != null) {
if (line.length() > 0 && !line.startsWith("#")) //$NON-NLS-1$
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 6fa92d3b0b..5ed286baa9 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
@@ -44,7 +44,7 @@
package org.eclipse.jgit.pgm;
-import static org.eclipse.jgit.lib.Constants.CHARSET;
+import static java.nio.charset.StandardCharsets.UTF_8;
import java.io.File;
import java.io.IOException;
@@ -227,7 +227,7 @@ public class Main {
}
PrintWriter createErrorWriter() {
- return new PrintWriter(new OutputStreamWriter(System.err, CHARSET));
+ return new PrintWriter(new OutputStreamWriter(System.err, UTF_8));
}
private void execute(String[] argv) throws Exception {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java
index 575a122158..248eaac8ad 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java
@@ -43,7 +43,7 @@
package org.eclipse.jgit.pgm.debug;
-import static org.eclipse.jgit.lib.Constants.CHARSET;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static org.eclipse.jgit.lib.Constants.HEAD;
import static org.eclipse.jgit.lib.Constants.MASTER;
import static org.eclipse.jgit.lib.Constants.R_HEADS;
@@ -154,7 +154,7 @@ class BenchmarkReftable extends TextBuiltin {
throws IOException, FileNotFoundException {
RefList.Builder<Ref> list = new RefList.Builder<>();
try (BufferedReader br = new BufferedReader(new InputStreamReader(
- new FileInputStream(lsRemotePath), CHARSET))) {
+ new FileInputStream(lsRemotePath), UTF_8))) {
Ref last = null;
String line;
while ((line = br.readLine()) != null) {
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 2d16fefa71..8948c27537 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
@@ -43,6 +43,8 @@
package org.eclipse.jgit.pgm.debug;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -141,7 +143,7 @@ class RebuildCommitGraph extends TextBuiltin {
try (RevWalk rw = new RevWalk(db);
final BufferedReader br = new BufferedReader(
new InputStreamReader(new FileInputStream(graph),
- Constants.CHARSET))) {
+ UTF_8))) {
String line;
while ((line = br.readLine()) != null) {
final String[] parts = line.split("[ \t]{1,}"); //$NON-NLS-1$
@@ -280,7 +282,7 @@ class RebuildCommitGraph extends TextBuiltin {
try (RevWalk rw = new RevWalk(db);
BufferedReader br = new BufferedReader(
new InputStreamReader(new FileInputStream(refList),
- Constants.CHARSET))) {
+ UTF_8))) {
String line;
while ((line = br.readLine()) != null) {
final String[] parts = line.split("[ \t]{1,}"); //$NON-NLS-1$
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
index c5ea028be8..6cbc1b082b 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
@@ -43,7 +43,7 @@
package org.eclipse.jgit.pgm.debug;
-import static org.eclipse.jgit.lib.Constants.CHARSET;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static org.eclipse.jgit.lib.Constants.HEAD;
import static org.eclipse.jgit.lib.Constants.MASTER;
import static org.eclipse.jgit.lib.Constants.R_HEADS;
@@ -192,7 +192,7 @@ class WriteReftable extends TextBuiltin {
static List<Ref> readRefs(String inputFile) throws IOException {
List<Ref> refs = new ArrayList<>();
try (BufferedReader br = new BufferedReader(
- new InputStreamReader(new FileInputStream(inputFile), CHARSET))) {
+ new InputStreamReader(new FileInputStream(inputFile), UTF_8))) {
String line;
while ((line = br.readLine()) != null) {
ObjectId id = ObjectId.fromString(line.substring(0, 40));
@@ -227,7 +227,7 @@ class WriteReftable extends TextBuiltin {
List<LogEntry> log = new ArrayList<>();
try (BufferedReader br = new BufferedReader(
- new InputStreamReader(new FileInputStream(logPath), CHARSET))) {
+ new InputStreamReader(new FileInputStream(logPath), UTF_8))) {
@SuppressWarnings("nls")
Pattern pattern = Pattern.compile("([^,]+)" // 1: ref
+ ",([0-9]+(?:[.][0-9]+)?)" // 2: time