[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Commit hook: properly handle amended commits

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <692db89cebe55_2a678d4c2f7@gitlab-sidekiq-low-urgency-cpu-bound-v2-7879b95b78-zb5dr.mail>

luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
3d8b7118 by Landry Bitege at 2025-12-01T15:39:39+00:00
[FIX] Commit hook: properly handle amended commits
---
* [FIX] Commit hook: properly handle amended commits

See merge request tikiwiki/tiki!9160

- - - - -


1 changed file:

- .husky/commit-msg


Changes:

=====================================
.husky/commit-msg
=====================================
@@ -77,6 +77,8 @@ fi
 if echo "$msg" | grep -Eq "^(\[[A-Z]+\]){1,5}[[:space:]]+.+$"; then
     tags_part=$(echo "$msg" | grep -Eo "^(\[[A-Z]+\]){1,5}" || echo "")
     body_part=$(echo "$msg" | sed -E "s/^(\[[A-Z]+\]){1,5}[[:space:]]+//")
+    # Remove Git comment lines from body
+    body_part=$(echo "$body_part" | sed '/^[[:space:]]*#/d')
 
     if [ -z "$body_part" ] || echo "$body_part" | grep -Eq "^[[:space:]]*$"; then
         echo "❌ Error: Commit body is empty after tags."



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/3d8b71188ebff6ca3f3d6f3a8ab8df89cdeec271

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/3d8b71188ebff6ca3f3d6f3a8ab8df89cdeec271
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.