From cf6cec8c281fb419543f342b83abb266ade4e308 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Wed, 20 May 2009 01:13:16 +0200 Subject: [PATCH] Allow non-ASCII ref names when writing the packed-refs file Previously we crashed. Now we encode using UTF-8. This may possibly change the encoding in the packed-refs file as we try to be smart about reading the file when converting to Java strings. Signed-off-by: Robin Rosenberg Signed-off-by: Shawn O. Pearce --- org.spearce.jgit/src/org/spearce/jgit/lib/RefWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/RefWriter.java b/org.spearce.jgit/src/org/spearce/jgit/lib/RefWriter.java index 2d397135..0a1bac86 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/RefWriter.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/RefWriter.java @@ -145,7 +145,7 @@ public abstract class RefWriter { w.write('\n'); } } - writeFile(Constants.PACKED_REFS, Constants.encodeASCII(w.toString())); + writeFile(Constants.PACKED_REFS, Constants.encode(w.toString())); } /** -- 2.11.4.GIT