mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
Fix dequote error in "normal" lines
Without this, quotes in normal lines were removed.
This commit is contained in:
@@ -110,6 +110,7 @@ public class GitDiffCommand extends AbstractGitCommand implements DiffCommand {
|
||||
return;
|
||||
}
|
||||
numberOfPotentialBeginning = -1;
|
||||
inPotentialQuotedLine = false;
|
||||
}
|
||||
|
||||
if (inPotentialQuotedLine && i == '"') {
|
||||
|
||||
@@ -16,7 +16,7 @@ public class GitDiffCommand_DequoteOutputStreamTest {
|
||||
"--- /dev/null\n" +
|
||||
"+++ \"b/\\303\\272\\303\\274\\303\\276\\303\\253\\303\\251\\303\\245\\303\\253\\303\\245\\303\\251 \\303\\245g\\303\\260f\\303\\237\"\n" +
|
||||
"@@ -0,0 +1 @@\n" +
|
||||
"+rthms";
|
||||
"+String s = \"quotes shall be kept\";";
|
||||
|
||||
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
|
||||
GitDiffCommand.DequoteOutputStream stream = new GitDiffCommand.DequoteOutputStream(buffer);
|
||||
@@ -30,6 +30,6 @@ public class GitDiffCommand_DequoteOutputStreamTest {
|
||||
"--- /dev/null\n" +
|
||||
"+++ b/úüþëéåëåé ågðfß\n" +
|
||||
"@@ -0,0 +1 @@\n" +
|
||||
"+rthms");
|
||||
"+String s = \"quotes shall be kept\";");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user