adding docs about ref
@@ -176,6 +176,8 @@ class Repo2Docker(Application):
sys.exit(1)
if ref:
+ if len(ref.split('/')) != 2:
+ raise ValueError('--ref must be of the form remote/ref')
try:
for line in execute_cmd(['git', 'reset', '--hard', ref],
cwd=checkout_path,
@@ -245,7 +247,8 @@ class Repo2Docker(Application):
argparser.add_argument(
'--ref',
- help='If building a git url, which ref to check out'
+ help=('If building a git url, which ref to check out. Must be of'
+ 'the form `remote/ref`. E.g., `origin/master`.')
)
argparser.add_argument(
