mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix(hooks): drop basename from commit-msg
The hook parsed the message path with basename, an external command. Where it is missing from PATH the substitution yields an empty string, set -e does not trip on it, and the MERGE_MSG guard silently stops working — a generated merge commit would then be rejected for missing trailers it cannot have. POSIX parameter expansion needs no external command and behaves the same in sh, dash, bash and Git Bash. Issue: #116 User-Visible: no
This commit is contained in:
Executable → Regular
+1
-1
@@ -5,7 +5,7 @@ message_file=$1
|
||||
|
||||
# Git-generated merge commits do not represent an independently authored
|
||||
# product change and inherit provenance from their parents.
|
||||
case "$(basename "$message_file")" in
|
||||
case "${message_file##*/}" in
|
||||
MERGE_MSG) exit 0 ;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user