From 196988d4f86e40e314c8657e04e6f51b1edee7e1 Mon Sep 17 00:00:00 2001 From: zhixuan2333 Date: Sat, 1 Apr 2023 12:51:52 +0000 Subject: [PATCH 1/3] add skip gptcommit --- .husky/prepare-commit-msg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index f1a6f16f..5c16003e 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -1,5 +1,10 @@ #!/bin/sh ### BEGIN GPTCOMMIT HOOK ### +if ! command -v prepare-commit-msg &> /dev/null +then + echo "prepare-commit-msg not found. Skiped." + exit +fi gptcommit prepare-commit-msg --commit-msg-file "$1" --commit-source "$2" --commit-sha "$3" ### END GPTCOMMIT HOOK ### From 56300e84c9e80e0764493ccaa52d0f2eede46df8 Mon Sep 17 00:00:00 2001 From: zhixuan2333 Date: Sat, 1 Apr 2023 12:56:13 +0000 Subject: [PATCH 2/3] update command name --- .husky/prepare-commit-msg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index 5c16003e..83004076 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -1,9 +1,9 @@ #!/bin/sh ### BEGIN GPTCOMMIT HOOK ### -if ! command -v prepare-commit-msg &> /dev/null +if ! command -v gptcommit &> /dev/null then - echo "prepare-commit-msg not found. Skiped." + echo "gptcommit not found. Skiped." exit fi gptcommit prepare-commit-msg --commit-msg-file "$1" --commit-source "$2" --commit-sha "$3" From 96de2146f5145343f5b0a6995a436ae1ca63c3d5 Mon Sep 17 00:00:00 2001 From: zhixuan2333 Date: Sat, 1 Apr 2023 12:57:07 +0000 Subject: [PATCH 3/3] follow husky --- .husky/prepare-commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index 83004076..3f93554d 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -3,7 +3,7 @@ ### BEGIN GPTCOMMIT HOOK ### if ! command -v gptcommit &> /dev/null then - echo "gptcommit not found. Skiped." + echo "Not found gptcommit. Skiped." exit fi gptcommit prepare-commit-msg --commit-msg-file "$1" --commit-source "$2" --commit-sha "$3"