summaryrefslogtreecommitdiffstats
path: root/pre_commit/commands/hook_impl.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:00:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:00:25 +0000
commita5907b904f568d3249b7629ea9ff3b932f723ce3 (patch)
treeb82c427c125ea5fcf9d1e2fb48e4a529fc932fba /pre_commit/commands/hook_impl.py
parentAdding upstream version 2.18.1. (diff)
downloadpre-commit-a5907b904f568d3249b7629ea9ff3b932f723ce3.tar.xz
pre-commit-a5907b904f568d3249b7629ea9ff3b932f723ce3.zip
Adding upstream version 2.19.0.upstream/2.19.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.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pre_commit/commands/hook_impl.py b/pre_commit/commands/hook_impl.py
index 18e5e9f..f315c04 100644
--- a/pre_commit/commands/hook_impl.py
+++ b/pre_commit/commands/hook_impl.py
@@ -114,7 +114,8 @@ def _pre_push_ns(
remote_url = args[1]
for line in stdin.decode().splitlines():
- local_branch, local_sha, remote_branch, remote_sha = line.split()
+ parts = line.rsplit(maxsplit=3)
+ local_branch, local_sha, remote_branch, remote_sha = parts
if local_sha == Z40:
continue
elif remote_sha != Z40 and _rev_exists(remote_sha):