From 8da184333e7384d09e56c5caed34c8e5565efbe2 Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Thu, 3 Oct 2024 23:06:12 +0200 Subject: [PATCH] added logging to commit hooks --- .hooks/post-commit | 2 ++ .hooks/pre-commit | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.hooks/post-commit b/.hooks/post-commit index 7803850..93d7f15 100755 --- a/.hooks/post-commit +++ b/.hooks/post-commit @@ -1,3 +1,5 @@ #!/usr/bin/env bash +echo "restoring stashed changes" + git stash pop -q diff --git a/.hooks/pre-commit b/.hooks/pre-commit index 524d4e5..6687ec0 100755 --- a/.hooks/pre-commit +++ b/.hooks/pre-commit @@ -1,5 +1,6 @@ #!/usr/bin/env bash +echo "stashing all uncommitted changes" git stash -q --keep-index echo "checking flakes all compile" @@ -14,6 +15,7 @@ echo "running linter" RESULT=$? +echo "adding lint changes to commit" git add -u exit $RESULT \ No newline at end of file