From 7ba7668fbb05a455ebe4182c9bf90ff45eac0e04 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sun, 28 Nov 2021 19:59:23 +0100 Subject: [PATCH] Meta: Allow overlong 'fixup!' commit titles in pre-commit hook --- .github/workflows/lintcommits.yml | 1 + Meta/lint-commit.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/lintcommits.yml b/.github/workflows/lintcommits.yml index 7d1006b316f..0c5dddda209 100644 --- a/.github/workflows/lintcommits.yml +++ b/.github/workflows/lintcommits.yml @@ -3,6 +3,7 @@ name: Commit linter on: [pull_request_target] # Make sure to update Meta/lint-commit.sh to match this script when adding new checks! +# (… but don't accept overlong 'fixup!' commit descriptions.) jobs: lint_commits: diff --git a/Meta/lint-commit.sh b/Meta/lint-commit.sh index b30dd9bcd0f..293220da7a8 100755 --- a/Meta/lint-commit.sh +++ b/Meta/lint-commit.sh @@ -24,6 +24,8 @@ while read -r line; do # ignore comment lines [[ "$line" =~ ^#.* ]] && continue + # ignore overlong 'fixup!' commit descriptions + [[ "$line" =~ ^fixup!\ .* ]] && continue ((line_number += 1)) line_length=${#line}