From 34bb501be08aa2b313d88e67d6e0a7e0a3f9cfa6 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 5 May 2024 00:07:30 +0200 Subject: New upstream version 1.47.90 --- contrib/scripts/checkpatch-git-post-commit-hook | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 contrib/scripts/checkpatch-git-post-commit-hook (limited to 'contrib/scripts/checkpatch-git-post-commit-hook') diff --git a/contrib/scripts/checkpatch-git-post-commit-hook b/contrib/scripts/checkpatch-git-post-commit-hook new file mode 100755 index 00000000..96479107 --- /dev/null +++ b/contrib/scripts/checkpatch-git-post-commit-hook @@ -0,0 +1,23 @@ +#!/bin/sh + +# contrib/scripts/checkpatch-git-post-commit-hook: +# Call this script via ".git/hooks/post-commit" + +DISABLED=${NM_HOOK_DISABLED:0} + +if [ "$DISABLED" == 1 ]; then + echo "COMMIT HOOK DISABLED" + exit 0 +fi + +FILE=contrib/scripts/checkpatch-feature-branch.sh +if [ -x "$FILE" ]; then + "$FILE" + exit 0 +fi + +FILE=contrib/scripts/checkpatch.pl +if [ -x "$FILE" ]; then + git format-patch -U65535 --stdout -1 | "$FILE" + exit 0 +fi -- cgit 1.3.0-6-gf8a5