diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-12 12:03:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-12 12:03:27 +0000 |
commit | d46c288cfdeadb070fa71c744b9970b3f1c7a623 (patch) | |
tree | 729e2a3fd230cfaca2e921e06fbefa9f586a8f98 /pre_commit/commands/hook_impl.py | |
parent | Releasing debian version 2.13.0-1. (diff) | |
download | pre-commit-d46c288cfdeadb070fa71c744b9970b3f1c7a623.tar.xz pre-commit-d46c288cfdeadb070fa71c744b9970b3f1c7a623.zip |
Merging upstream version 2.14.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/commands/hook_impl.py')
-rw-r--r-- | pre_commit/commands/hook_impl.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pre_commit/commands/hook_impl.py b/pre_commit/commands/hook_impl.py index a766ee9..c544167 100644 --- a/pre_commit/commands/hook_impl.py +++ b/pre_commit/commands/hook_impl.py @@ -70,6 +70,7 @@ def _ns( *, all_files: bool = False, remote_branch: Optional[str] = None, + local_branch: Optional[str] = None, from_ref: Optional[str] = None, to_ref: Optional[str] = None, remote_name: Optional[str] = None, @@ -82,6 +83,7 @@ def _ns( color=color, hook_stage=hook_type.replace('pre-', ''), remote_branch=remote_branch, + local_branch=local_branch, from_ref=from_ref, to_ref=to_ref, remote_name=remote_name, @@ -110,7 +112,7 @@ def _pre_push_ns( remote_url = args[1] for line in stdin.decode().splitlines(): - _, local_sha, remote_branch, remote_sha = line.split() + local_branch, local_sha, remote_branch, remote_sha = line.split() if local_sha == Z40: continue elif remote_sha != Z40 and _rev_exists(remote_sha): @@ -118,6 +120,7 @@ def _pre_push_ns( 'pre-push', color, from_ref=remote_sha, to_ref=local_sha, remote_branch=remote_branch, + local_branch=local_branch, remote_name=remote_name, remote_url=remote_url, ) else: @@ -139,6 +142,7 @@ def _pre_push_ns( all_files=True, remote_name=remote_name, remote_url=remote_url, remote_branch=remote_branch, + local_branch=local_branch, ) else: rev_cmd = ('git', 'rev-parse', f'{first_ancestor}^') @@ -148,6 +152,7 @@ def _pre_push_ns( from_ref=source, to_ref=local_sha, remote_name=remote_name, remote_url=remote_url, remote_branch=remote_branch, + local_branch=local_branch, ) # nothing to push |