summaryrefslogtreecommitdiffstats
path: root/pre_commit/commands/run.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-12 12:03:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-12 12:03:24 +0000
commitdb201c7e8329ebc584fbebcc18f5b64825f6d023 (patch)
treeeed388903a58a2988bdf587ee7c7622d167226f7 /pre_commit/commands/run.py
parentAdding upstream version 2.13.0. (diff)
downloadpre-commit-db201c7e8329ebc584fbebcc18f5b64825f6d023.tar.xz
pre-commit-db201c7e8329ebc584fbebcc18f5b64825f6d023.zip
Adding upstream version 2.14.0.upstream/2.14.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/commands/run.py')
-rw-r--r--pre_commit/commands/run.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py
index 0fef50d..d906d5b 100644
--- a/pre_commit/commands/run.py
+++ b/pre_commit/commands/run.py
@@ -371,7 +371,11 @@ def run(
environ['PRE_COMMIT_FROM_REF'] = args.from_ref
environ['PRE_COMMIT_TO_REF'] = args.to_ref
- if args.remote_name and args.remote_url and args.remote_branch:
+ if (
+ args.remote_name and args.remote_url and
+ args.remote_branch and args.local_branch
+ ):
+ environ['PRE_COMMIT_LOCAL_BRANCH'] = args.local_branch
environ['PRE_COMMIT_REMOTE_BRANCH'] = args.remote_branch
environ['PRE_COMMIT_REMOTE_NAME'] = args.remote_name
environ['PRE_COMMIT_REMOTE_URL'] = args.remote_url