diff --git a/src/de/uni_passau/fim/seibt/gitwrapper/repo/GitWrapper.java b/src/de/uni_passau/fim/seibt/gitwrapper/repo/GitWrapper.java index c202a17142f6d2fca2fdeb5792da3755aff37139..f94cef0b21c33c576c52ab8223707f388dafdddd 100644 --- a/src/de/uni_passau/fim/seibt/gitwrapper/repo/GitWrapper.java +++ b/src/de/uni_passau/fim/seibt/gitwrapper/repo/GitWrapper.java @@ -37,22 +37,25 @@ public class GitWrapper extends ToolWrapper { private static final String GIT_VERSION_C = "--version"; private static final String GIT_VERSION_PREFIX = "git version"; - private static final Map<String, String> env; + private static final Map<String, String> environment; private static final List<String> defaultOptions; static { - env = new HashMap<>(); - + Map<String, String> env = new HashMap<>(); String locale = "C"; + env.put("LANGUAGE", locale); env.put("LC_ALL", locale); env.put("LANG", locale); + environment = Collections.unmodifiableMap(env); + + List<String> defOptions = new ArrayList<>(); - defaultOptions = new ArrayList<>(); - defaultOptions.add("-c"); - defaultOptions.add("core.quotePath=false"); - defaultOptions.add("-c"); - defaultOptions.add("core.precomposeUnicode=true"); + defOptions.add("-c"); + defOptions.add("core.quotePath=false"); + defOptions.add("-c"); + defOptions.add("core.precomposeUnicode=true"); + defaultOptions = Collections.unmodifiableList(defOptions); } /** @@ -237,6 +240,6 @@ public class GitWrapper extends ToolWrapper { Collections.addAll(pars, parameters); } - return exec(workingDirectory, true, env, pars); + return exec(workingDirectory, true, environment, pars); } }