threads / patch / 16977

patchAllow non-ASCII ref names when writing packs

Subject: [EGIT PATCH] Allow non-ASCII ref names when writing packs

## tl;dr

2 messages between Jan 3, 2009 and Jan 3, 2009. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Robin Rosenberg· Jan 3, 2009, 22:04 UTC · lore
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../org/spearce/jgit/transport/PacketLineOut.java  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Disovered this bug when trying to clone a local repo with some "funny" ref names. C Git handles them so jgit should too.

-- robin
Show changes to org.spearce.jgit/src/org/spearce/jgit/transport/PacketLineOut.java +1 −1
diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/PacketLineOut.java b/org.spearce.jgit/src/org/spearce/jgit/transport/PacketLineOut.java
index aae4be5..cb6d89a 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/PacketLineOut.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/PacketLineOut.java
@@ -54,7 +54,7 @@ PacketLineOut(final OutputStream i) {
 	}
 
 	void writeString(final String s) throws IOException {
-		writePacket(Constants.encodeASCII(s));
+		writePacket(Constants.encode(s));
 	}
 
 	void writePacket(final byte[] packet) throws IOException {
-- 
1.6.1.rc3.56.gd0306
Shawn O. Pearce· Jan 3, 2009, 22:11 UTC · re: Robin Rosenberg · lore

Re: [EGIT PATCH] Allow non-ASCII ref names when writing packs

Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
Show 7 quoted lines
> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
> ---
>  .../org/spearce/jgit/transport/PacketLineOut.java  |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> Disovered this bug when trying to clone a local repo with some "funny" 
> ref names. C Git handles them so jgit should too.
Oy.  Good catch.
 
-- 
Shawn.

← back to recent threads