added remote-branch as args parser argument

This commit is contained in:
surafelabebe 2020-12-21 15:50:05 -08:00 committed by Surafel Worku
parent 945549acbc
commit dbd75ca7b2
2 changed files with 4 additions and 0 deletions

View file

@ -379,6 +379,7 @@ def run(
if args.remote_name and args.remote_url: if args.remote_name and args.remote_url:
environ['PRE_COMMIT_REMOTE_NAME'] = args.remote_name environ['PRE_COMMIT_REMOTE_NAME'] = args.remote_name
environ['PRE_COMMIT_REMOTE_URL'] = args.remote_url environ['PRE_COMMIT_REMOTE_URL'] = args.remote_url
print(environ['PRE_COMMIT_REMOTE_NAME'])
if args.checkout_type: if args.checkout_type:
environ['PRE_COMMIT_CHECKOUT_TYPE'] = args.checkout_type environ['PRE_COMMIT_CHECKOUT_TYPE'] = args.checkout_type

View file

@ -96,6 +96,9 @@ def _add_run_options(parser: argparse.ArgumentParser) -> None:
'--hook-stage', choices=C.STAGES, default='commit', '--hook-stage', choices=C.STAGES, default='commit',
help='The stage during which the hook is fired. One of %(choices)s', help='The stage during which the hook is fired. One of %(choices)s',
) )
parser.add_argument(
'--remote-branch', help='Remote branch ref used by `git push`.',
)
parser.add_argument( parser.add_argument(
'--from-ref', '--source', '-s', '--from-ref', '--source', '-s',
help=( help=(