From 8beb5e07bc8eb9250e9eb9856d3b14b13b88e2ec Mon Sep 17 00:00:00 2001 From: Chris Holdgraf Date: Wed, 27 Jun 2018 08:30:10 -0700 Subject: [PATCH] checking for origin/ explicitly --- repo2docker/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/repo2docker/app.py b/repo2docker/app.py index b7480ade..2853718d 100644 --- a/repo2docker/app.py +++ b/repo2docker/app.py @@ -175,8 +175,10 @@ class Repo2Docker(Application): sys.exit(1) if ref: - if self.repo_type == "remote" and len(ref.split('/')) < 2: + if self.repo_type == "remote" and not ref.startswith('origin/'): # Ensure that the ref has `origin` in front + self.log.info("Ref did not have a remote specified, " + "adding 'origin/' to ref.") ref = '/'.join(["origin", ref]) try: for line in execute_cmd(['git', 'reset', '--hard', ref],