From ed8e617fd4b9ea8b3148760de95cd07901a53fb2 Mon Sep 17 00:00:00 2001 From: "Kirill.Likhodedov" Date: Wed, 26 Dec 2012 21:21:51 +0400 Subject: [PATCH] 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. --- .../git4idea/src/git4idea/commands/GitHandler.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/git4idea/src/git4idea/commands/GitHandler.java b/plugins/git4idea/src/git4idea/commands/GitHandler.java index 201085d065a2..1fb0b615e278 100644 --- a/plugins/git4idea/src/git4idea/commands/GitHandler.java +++ b/plugins/git4idea/src/git4idea/commands/GitHandler.java @@ -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; }