mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
added remote-branch as args parser argument
This commit is contained in:
parent
945549acbc
commit
dbd75ca7b2
2 changed files with 4 additions and 0 deletions
|
|
@ -379,6 +379,7 @@ def run(
|
|||
if args.remote_name and args.remote_url:
|
||||
environ['PRE_COMMIT_REMOTE_NAME'] = args.remote_name
|
||||
environ['PRE_COMMIT_REMOTE_URL'] = args.remote_url
|
||||
print(environ['PRE_COMMIT_REMOTE_NAME'])
|
||||
|
||||
if args.checkout_type:
|
||||
environ['PRE_COMMIT_CHECKOUT_TYPE'] = args.checkout_type
|
||||
|
|
|
|||
|
|
@ -96,6 +96,9 @@ def _add_run_options(parser: argparse.ArgumentParser) -> None:
|
|||
'--hook-stage', choices=C.STAGES, default='commit',
|
||||
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(
|
||||
'--from-ref', '--source', '-s',
|
||||
help=(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue