From: Bob Beck Date: Mon, 22 Sep 2025 20:59:36 +0000 (-0600) Subject: Add git pre-commit hook example to the script X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4018d2d1504248639527e77a4a42d827b19825e8;p=thirdparty%2Fopenssl.git Add git pre-commit hook example to the script Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/28639) --- diff --git a/util/codespell-check.sh b/util/codespell-check.sh index 09f8b3d4374..657bf8db0da 100755 --- a/util/codespell-check.sh +++ b/util/codespell-check.sh @@ -6,6 +6,32 @@ # # Any arguments provided (such as -w) are added to the # codespell invocation. +# +# You can add this check to your git pre-commit hooks +# with something akin to the following: +# --------8<---------- +#check_codespell_diff() { +# spelling_mistakes="" +# while read -r -d '' path; do +# spelling_mistakes="`util/codespell-check.sh $path`" +# done +# if [ -n "$spelling_mistakes" ]; then +# cat >&2 <