diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-01 15:18:31 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-02 01:35:45 +0000 |
commit | 0652a0b545a1c11627e153d187292d905be15bb0 (patch) | |
tree | 6cc86d66b7792058d88d1ad7a49a879c9789ef88 /ci | |
parent | b4c98cb04c87999eccd061cc59e6f5f8fa706220 (diff) | |
download | mpv-0652a0b545a1c11627e153d187292d905be15bb0.tar.bz2 mpv-0652a0b545a1c11627e153d187292d905be15bb0.tar.xz |
ci/lint: ignore subject length for revert commits
The default revert will always add 9 extra characters which means it
could go over the 72 character soft limit if the commit being reverted
has a long subject. We won't fuss about this so just shut up the lint in
this case.
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/lint-commit-msg.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ci/lint-commit-msg.py b/ci/lint-commit-msg.py index 90a8257824..404621017e 100755 --- a/ci/lint-commit-msg.py +++ b/ci/lint-commit-msg.py @@ -95,7 +95,8 @@ def no_merge(body): @lint_rule("Subject line should be shorter than 72 characters") def line_too_long(body): - return len(body[0]) <= 72 + revert = re.search(r"^Revert \"(.*)\"", body[0]) + return True if revert else len(body[0]) <= 72 @lint_rule("Prefix should not include C file extensions (use `vo_gpu: ...` not `vo_gpu.c: ...`)") def no_file_exts(body): |