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

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:45:51

Signed-off-by: Robin Rosenberg <redacted>
---
 .../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
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

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

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:51

Robin Rosenberg [off-list ref] wrote:
Signed-off-by: Robin Rosenberg <redacted>
---
 .../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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help