Skip to content
Snippets Groups Projects
Unverified Commit e6bda25a authored by Oliver Smith's avatar Oliver Smith
Browse files

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
parent d2035418
Branches
No related tags found
1 merge request!6348githooks/prepare-commit-msg: add systemd prefixes
......@@ -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)"
;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment