From 257f3fe4a1b9e450b2f665b5f0ed09a3ab3839b9 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Tue, 27 Nov 2012 08:34:40 +0100 Subject: [PATCH] Commit message may not necessarily be in UTF-8 Trying different encoding makes presentation nicer to user. Change-Id: I2d2c2a95d0b5cd709855d7a67cbc247478434d2f --- org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java index 3f99057f9..2cf759c5f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java @@ -278,8 +278,8 @@ public class RebaseCommand extends GitCommand { sb.append(" "); sb.append(step.commit.name()); sb.append(" "); - sb.append(new String(step.shortMessage, - Constants.CHARACTER_ENCODING).trim()); + sb.append(RawParseUtils.decode(step.shortMessage) + .trim()); fw.write(sb.toString()); fw.newLine(); }