summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2022-06-16 18:04:06 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2022-06-17 09:39:55 +0200
commit6674abb167cec7d3bb455ad99fb41f9b0f823fe7 (patch)
tree60c02cfe6770e7098a0d4cbfb9232e91fa714fc7 /org.eclipse.jgit.pgm/src
parentd1e173ba4099893345ce48cd58cc07041a57e1d5 (diff)
downloadjgit-6674abb167cec7d3bb455ad99fb41f9b0f823fe7.tar.gz
jgit-6674abb167cec7d3bb455ad99fb41f9b0f823fe7.zip
Use SystemReader#getDefaultCharset to read console input
In I986f97a410 SystemReader.getDefaultCharset() that provides the locale-dependent charset the way JEP 400 recommends. Change-Id: I30560ac47e450070e3864325d153d45f1a66882c
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java
index 3e6042afee..3113eeb640 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java
@@ -19,7 +19,6 @@ import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
-import java.nio.charset.StandardCharsets;
import java.text.MessageFormat;
import java.util.List;
import java.util.Map;
@@ -63,6 +62,7 @@ import org.eclipse.jgit.treewalk.WorkingTreeOptions;
import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
import org.eclipse.jgit.treewalk.filter.TreeFilter;
import org.eclipse.jgit.util.FS.ExecutionResult;
+import org.eclipse.jgit.util.SystemReader;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.Option;
@@ -138,7 +138,8 @@ class DiffTool extends TextBuiltin {
super.init(repository, gitDir);
diffFmt = new DiffFormatter(new BufferedOutputStream(outs));
diffTools = new DiffTools(repository);
- inputReader = new BufferedReader(new InputStreamReader(ins, StandardCharsets.UTF_8));
+ inputReader = new BufferedReader(new InputStreamReader(ins,
+ SystemReader.getInstance().getDefaultCharset()));
}
@Override