소스 검색

Fix test.

Jelmer Vernooij 3 년 전
부모
커밋
e519a52c3d
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      dulwich/client.py

+ 5 - 1
dulwich/client.py

@@ -516,7 +516,11 @@ class GitClient(object):
                     raise ValueError("checkout and bare are incompatible")
                 target = Repo.init_bare(target_path)
 
-            encoded_path = self.get_url(path).encode('utf-8')
+            # TODO(jelmer): abstract method for get_location?
+            if isinstance(self, (LocalGitClient, SubprocessGitClient)):
+                encoded_path = path.encode('utf-8')
+            else:
+                encoded_path = self.get_url(path).encode('utf-8')
 
             target_config = target.get_config()
             target_config.set((b"remote", origin.encode('utf-8')), b"url", encoded_path)