@@ -88,13 +88,13 @@ def branch_exists(self, branch):
8888 """
8989 try :
9090 heads = subprocess .run (
91- ["git" , "ls-remote" , "--heads" , self .git_url ],
91+ ["git" , "ls-remote" , "--heads" , "--" , self .git_url ],
9292 capture_output = True ,
9393 text = True ,
9494 check = True
9595 )
9696 tags = subprocess .run (
97- ["git" , "ls-remote" , "--tags" , self .git_url ],
97+ ["git" , "ls-remote" , "--tags" , "--" , self .git_url ],
9898 capture_output = True ,
9999 text = True ,
100100 check = True
@@ -118,7 +118,7 @@ def resolve_default_branch(self):
118118 """
119119 try :
120120 head_branch = subprocess .run (
121- ["git" , "ls-remote" , "--symref" , self .git_url , "HEAD" ],
121+ ["git" , "ls-remote" , "--symref" , "--" , self .git_url , "HEAD" ],
122122 capture_output = True ,
123123 text = True ,
124124 check = True
@@ -154,7 +154,7 @@ def initialize_repo(self):
154154 if self .depth and self .depth > 0 :
155155 clone_args .extend (['--depth' , str (self .depth )])
156156 clone_args .extend (['--branch' , self .branch_name ])
157- clone_args .extend ([self .git_url , self .repo_dir ])
157+ clone_args .extend (["--" , self .git_url , self .repo_dir ])
158158 yield from execute_cmd (clone_args )
159159 logging .info ('Repo {} initialized' .format (self .repo_dir ))
160160
0 commit comments