Support ~ in git:// URL paths.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 29 Jul 2011 09:46:09 +0000 (11:46 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 29 Jul 2011 09:46:09 +0000 (11:46 +0200)
NEWS
dulwich/client.py

diff --git a/NEWS b/NEWS
index 6c2fc292529b1174493bca8c3b8604d924f007d3..cb550f7727731b14002fb7c251ef15afaf51c7a1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,8 @@
   * Fix a bug in reading the pack checksum when there are fewer than 20 bytes
     left in the buffer. (Dave Borowitz)
 
+  * Support ~ in git:// URL paths. (Jelmer Vernooij, #813555)
+
  API CHANGES
 
   * write_pack no longer takes the num_objects argument and requires an object
index 5dd4e0bc1297f159e667975cb311a79760ae814a..e247f85d5128d0869494be2c2c199b6f0c6d0510 100644 (file)
@@ -301,6 +301,8 @@ class TCPGitClient(GitClient):
         wfile = s.makefile('wb', 0)
         proto = Protocol(rfile.read, wfile.write,
                          report_activity=self._report_activity)
+        if path.startswith("/~"):
+            path = path[1:]
         proto.send_cmd('git-%s' % cmd, path, 'host=%s' % self._host)
         return proto, lambda: _fileno_can_read(s)