From be58c81aff4cd4c0ccf43dbd7998da4a6a08c03b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 19:43:51 +0200 Subject: Adding upstream version 2.10.0+dfsg. Signed-off-by: Daniel Baumann --- .husky/prepare-commit-msg.cz | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 .husky/prepare-commit-msg.cz (limited to '.husky/prepare-commit-msg.cz') diff --git a/.husky/prepare-commit-msg.cz b/.husky/prepare-commit-msg.cz new file mode 100755 index 0000000..724527d --- /dev/null +++ b/.husky/prepare-commit-msg.cz @@ -0,0 +1,28 @@ +#!/bin/bash + +file="$1" +type="$2" + +if [ -z "$type" ]; then # only run on new commits + # + # Save any commit message trailers generated by Git. + # + + trailers=$(git interpret-trailers --parse "$file") + + # + # Execute the Commitizen hook. + # + + (exec < "/dev/tty" && npx --no-install git-cz --hook) || true + + # + # Restore any trailers that Commitizen might have overwritten. + # + + printf "\n" >> "$file" + + while IFS= read -r trailer; do + git interpret-trailers --in-place --trailer "$trailer" "$file" + done <<< "$trailers" +fi -- cgit v1.2.3