GK SDK 源码库: XMIPCLinuxV100R005C00SPC030 (kernel/tools/open_source excluded)
This commit is contained in:
+28
@@ -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
|
||||
Reference in New Issue
Block a user