[EGIT PATCH 4/6] Allow non-ASCII ref names when writing the packed-refs file
- From
Robin Rosenberg <robin.rosenberg@dewire.com>
- Date
- May 19, 2009, 23:13 UTC
- Message-ID
- <1242774798-23639-5-git-send-email-robin.rosenberg@dewire.com>
- In-Reply-To
- <1242774798-23639-4-git-send-email-robin.rosenberg@dewire.com>
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 <robin.rosenberg@dewire.com> --- .../src/org/spearce/jgit/lib/RefWriter.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
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 2d39713..0a1bac8 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 void writePackedRefs() throws IOException { w.write('\n'); } } - writeFile(Constants.PACKED_REFS, Constants.encodeASCII(w.toString())); + writeFile(Constants.PACKED_REFS, Constants.encode(w.toString())); } /**
-- 1.6.3.dirty