Browse Source

Support ~ in git:// URL paths.

Jelmer Vernooij 13 years ago
parent
commit
8749fb2819
2 changed files with 4 additions and 0 deletions
  1. 2 0
      NEWS
  2. 2 0
      dulwich/client.py

+ 2 - 0
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

+ 2 - 0
dulwich/client.py

@@ -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)