From ba3b2ac1c9830f5b311cd5c2096f91de74e4859b Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 5 Sep 2024 10:50:10 +0200 Subject: [PATCH] git-verify-commit --- .zshrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.zshrc b/.zshrc index 9c1b09e..847a9e7 100644 --- a/.zshrc +++ b/.zshrc @@ -82,6 +82,16 @@ if __name__ == \"__main__\": function countlines() { find . -type f -name "$1" -exec wc -l {} \; | awk '{print $0} {total += $1} END {print "Total lines:", total}' } +function git-verify-commit () { +git verify-commit $1 +ret=$? +if [ $ret -ne 0 ]; then + echo "Commit is not signed." +else + echo "OK" +fi +return $ret +} ### ---- zsh options ------------------------------------- setopt autocd