File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 8686import dulwich .porcelain
8787import dulwich .repo
8888
89+ from dulwich import __version__ as dulwich_version
90+
8991from . import (
9092 AbstractSchemeRepoFetcher ,
9193 DocumentedStatefulProtocolFetcher ,
@@ -296,9 +298,14 @@ def _find_git_repo_in_uri(
296298 # Possible sha in repoTag
297299 memory_repo = dulwich .repo .MemoryRepo ()
298300 transport , path = get_transport_and_path (remote_uri_anc )
299- fetch_pack_result = transport .fetch (
300- path , cast ("dulwich.repo.Repo" , memory_repo )
301- )
301+ if dulwich_version < (0 , 24 , 6 ):
302+ fetch_pack_result = transport .fetch (
303+ path , cast ("dulwich.repo.Repo" , memory_repo ) # type: ignore[arg-type]
304+ )
305+ else :
306+ fetch_pack_result = transport .fetch (
307+ path .encode ("utf-8" ), cast ("dulwich.repo.Repo" , memory_repo ) # type: ignore[arg-type]
308+ )
302309 try :
303310 memory_repo .get_object (repoTag .encode ("utf-8" ))
304311 b_default_repo_tag = repoTag
You can’t perform that action at this time.
0 commit comments