@@ -88,13 +88,13 @@ def branch_exists(self, branch):
88
88
"""
89
89
try :
90
90
heads = subprocess .run (
91
- ["git" , "ls-remote" , "--heads" , self .git_url ],
91
+ ["git" , "ls-remote" , "--heads" , "--" , self .git_url ],
92
92
capture_output = True ,
93
93
text = True ,
94
94
check = True
95
95
)
96
96
tags = subprocess .run (
97
- ["git" , "ls-remote" , "--tags" , self .git_url ],
97
+ ["git" , "ls-remote" , "--tags" , "--" , self .git_url ],
98
98
capture_output = True ,
99
99
text = True ,
100
100
check = True
@@ -118,7 +118,7 @@ def resolve_default_branch(self):
118
118
"""
119
119
try :
120
120
head_branch = subprocess .run (
121
- ["git" , "ls-remote" , "--symref" , self .git_url , "HEAD" ],
121
+ ["git" , "ls-remote" , "--symref" , "--" , self .git_url , "HEAD" ],
122
122
capture_output = True ,
123
123
text = True ,
124
124
check = True
@@ -154,7 +154,7 @@ def initialize_repo(self):
154
154
if self .depth and self .depth > 0 :
155
155
clone_args .extend (['--depth' , str (self .depth )])
156
156
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 ])
158
158
yield from execute_cmd (clone_args )
159
159
logging .info ('Repo {} initialized' .format (self .repo_dir ))
160
160
0 commit comments