checking for origin/ explicitly

pull/300/head
Chris Holdgraf 2018-06-27 08:30:10 -07:00
rodzic b1f504c480
commit 8beb5e07bc
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -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],