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:
@@ -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)"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user