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

2 messages from 2009-01-03 to 2009-01-03. Participants: Robin Rosenberg, Shawn O. Pearce.
Thread: https://gitlist.dev/t/16977

## Robin Rosenberg, 2009-01-03 22:04

Subject: [EGIT PATCH] Allow non-ASCII ref names when writing packs
Message-ID: <1231020275-7637-1-git-send-email-robin.rosenberg@dewire.com>
URL: https://gitlist.dev/e/1231020275-7637-1-git-send-email-robin.rosenberg%40dewire.com

```
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

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, 2009-01-03 22:11

Subject: Re: [EGIT PATCH] Allow non-ASCII ref names when writing packs
Message-ID: <20090103221138.GB12438@spearce.org>
URL: https://gitlist.dev/e/20090103221138.GB12438%40spearce.org
In-Reply-To: <1231020275-7637-1-git-send-email-robin.rosenberg@dewire.com>

```
Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
> 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.

```
