tools: commitlint: allow a git "fixup! " prefix

(Allows git commit --fixup and magit c F to work)
This commit is contained in:
Simon Michael 2022-02-07 09:46:55 -10:00
parent 41d7c7f6b3
commit cddc719bd1

View File

@ -66,7 +66,8 @@ function checkmsg()
# there can be zero or more topic prefixes of increasing depth
# a topic prefix must begin with a word character, can contain spaces/slashes/commas
# (so potentially multiple topic labels, eg "imp: bs, cf, is: cli/doc: blah blah")
elif ! echo "$SUMMARY" | grep -qE '^( *; *)?\w+( *!)? *: *(\w[\w,/ ]* *: *)*'
# Also permit a git "fixup! " prefix.
elif ! echo "$SUMMARY" | grep -qE '^(fixup! )?( *; *)?\w+( *!)? *: *(\w[\w,/ ]* *: *)*'
then
# shellcheck disable=SC2059
printf "$FMT" "$HASH" "$SUMMARY" "${RED}[FAIL]"