From 195caac172690456dcdc8cc7a6ca50e05abf8182 Mon Sep 17 00:00:00 2001 From: Riccardo Castellotti Date: Thu, 19 Aug 2021 15:49:43 +0200 Subject: [PATCH] Explicitly separate git-ls-remote options from positional arguments --- binderhub/repoproviders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binderhub/repoproviders.py b/binderhub/repoproviders.py index f33347b94..5d4b87c27 100755 --- a/binderhub/repoproviders.py +++ b/binderhub/repoproviders.py @@ -484,7 +484,7 @@ async def get_resolved_ref(self): self.sha1_validate(self.unresolved_ref) except ValueError: # The ref is a head/tag and we resolve it using `git ls-remote` - command = ["git", "ls-remote", self.repo, self.unresolved_ref] + command = ["git", "ls-remote", "--", self.repo, self.unresolved_ref] result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if result.returncode: raise RuntimeError("Unable to run git ls-remote to get the `resolved_ref`: {}".format(result.stderr))