mirror of
https://gitlab.postmarketos.org/postmarketOS/pmaports.git
synced 2025-07-12 16:19:48 +03:00
githooks/prepare-commit-msg: add systemd prefixes
Extend the hook to automatically make useful titles for packages in systemd directories. We had two styles for modifying the systemd package itself, either "systemd/systemd:" or "systemd:". Pick the shorter one. Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6348
This commit is contained in:
parent
d203541889
commit
e6bda25a0b
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ lcp=$(git diff-index --name-only --cached HEAD | longest_common_prefix)
|
|||
prefix=""
|
||||
|
||||
case "$lcp" in
|
||||
extra-repos/systemd/systemd/*)
|
||||
prefix="systemd"
|
||||
;;
|
||||
extra-repos/systemd/*)
|
||||
prefix="systemd/$(echo "$lcp" | cut -d/ -f3)"
|
||||
;;
|
||||
device/*/*)
|
||||
prefix="$(echo "$lcp" | cut -d/ -f3)"
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue