Adding upstream version 2.19.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
75996f15a7
commit
5216111727
53 changed files with 392 additions and 131 deletions
|
@ -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):
|
||||
|
|
16
pre_commit/commands/validate_config.py
Normal file
16
pre_commit/commands/validate_config.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pre_commit import clientlib
|
||||
|
||||
|
||||
def validate_config(filenames: list[str]) -> int:
|
||||
ret = 0
|
||||
|
||||
for filename in filenames:
|
||||
try:
|
||||
clientlib.load_config(filename)
|
||||
except clientlib.InvalidConfigError as e:
|
||||
print(e)
|
||||
ret = 1
|
||||
|
||||
return ret
|
16
pre_commit/commands/validate_manifest.py
Normal file
16
pre_commit/commands/validate_manifest.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pre_commit import clientlib
|
||||
|
||||
|
||||
def validate_manifest(filenames: list[str]) -> int:
|
||||
ret = 0
|
||||
|
||||
for filename in filenames:
|
||||
try:
|
||||
clientlib.load_manifest(filename)
|
||||
except clientlib.InvalidManifestError as e:
|
||||
print(e)
|
||||
ret = 1
|
||||
|
||||
return ret
|
Loading…
Add table
Add a link
Reference in a new issue