From 9e9e9296e971d3a1189b24f57f5e1296f6a3a8b0 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Wed, 12 Apr 2023 01:25:24 +0200 Subject: [PATCH] Updated pre-commit script to print command before executing and disallow running with unstaged changes --- .git-hooks/pre-commit | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit index a9d5658..0111726 100755 --- a/.git-hooks/pre-commit +++ b/.git-hooks/pre-commit @@ -8,5 +8,8 @@ set -o noglob # Disable filename expansion (globbing), # path splitting. shopt -s inherit_errexit # Inherit the errexit option status in subshells. +set -x + +git update-index --refresh cargo clippy --all-targets --all -- -D warnings cargo fmt -- --check