config/git/prepare-commit-msg: remove file extension

This commit is contained in:
xeruf 2024-07-25 12:42:47 +03:00
parent c5382934e1
commit cb4b56da96
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@ if beginswith $'\n#' "$original"; then
expr substr "$common" 1 "$count" | sed 's|.local/bin/scripts|bin|') || exit 0 expr substr "$common" 1 "$count" | sed 's|.local/bin/scripts|bin|') || exit 0
case "$path" in ([0-9]-*) path="${path#*-}";; esac case "$path" in ([0-9]-*) path="${path#*-}";; esac
{ {
# Remove initial dot and trailing slash/dash/underscore # Remove initial dot, file extension, trailing slash/dash/underscore
echo "$path" | sed 's|^\.||;s|[/_-]\?$|: |' echo "$path" | sed 's|^\.||;s|\.\([a-z]*\)$||;s|[/_-]\?$|: |'
echo "$original" echo "$original"
} > "$COMMIT_MSG_FILE" } > "$COMMIT_MSG_FILE"
fi fi