IDEA-98207, IDEA-92864 Stop escaping circumflex ^

Strangely, I stopped reproducing escaping of ^ on Windows, the same configuration, tested on different Gits.
Same for another user: no escaping, and thus 4 commits are being reset.

Comment the escaping code until this is fully investigated and tested.
This commit is contained in:
Kirill.Likhodedov
2012-12-26 21:28:52 +04:00
parent 8806dbdf82
commit ed8e617fd4
@@ -279,17 +279,19 @@ public abstract class GitHandler {
@NotNull
private static String escapeParameterIfNeeded(@NotNull String parameter) {
if (SystemInfo.isWindows && parameter.contains("^")) {
return parameter.replaceAll("\\^", "^^^^");
}
// strange situation: stopped reproducing the "escape" behavior while being on the same computer.
// let's keep this code commented until the problem is fully investigated & tested
//if (SystemInfo.isWindows && parameter.contains("^")) {
// return parameter.replaceAll("\\^", "^^^^");
//}
return parameter;
}
@NotNull
private String unescapeCommandLine(@NotNull String commandLine) {
if (SystemInfo.isWindows && commandLine.contains("^")) {
return commandLine.replaceAll("\\^\\^\\^\\^", "^");
}
//if (SystemInfo.isWindows && commandLine.contains("^")) {
// return commandLine.replaceAll("\\^\\^\\^\\^", "^");
//}
return commandLine;
}