config/git/prepare-commit-msg: remove file extension
This commit is contained in:
parent
c5382934e1
commit
cb4b56da96
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue