From 0a12cd58ed0fc7f207e030dee1e0f6a513d7f98c Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 16 Oct 2024 14:27:01 +0200 Subject: [PATCH] hooks:commit-msg: Source helpers directly from repo --- meta/git/hooks/commit-msg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/git/hooks/commit-msg b/meta/git/hooks/commit-msg index 3d300aa..d60405b 100755 --- a/meta/git/hooks/commit-msg +++ b/meta/git/hooks/commit-msg @@ -10,7 +10,8 @@ # To enable this hook, save this file in ".git/hooks/commit-msg". # Source die() -. "$HOME"/.local/bin/helpers.sh +repo_root="$(git rev-parse --show-toplevel)" +. "$repo_root"/.local/bin/helpers.sh subject="$(head -1 "$1")" # Ignore "fixup! " and "squash! " prefix' added by `git-commit`