Bug #946055 mentions that if /bin/sh is not bash, it will fail (specifically with mksh):

/etc/etckeeper/commit.d/50vcs-commit[22]: ${@#-m}: bad substitution

This is because doing trim operations on an array are not implemented in mksh, and unspecified in POSIX:

[…] If parameter is '#', '*', or '@', the result of the expansion is unspecified. […]

cf. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

The bug suggests a patch that uses sed instead of that pattern substitution:

--- a/commit.d/50vcs-commit
+++ b/commit.d/50vcs-commit
@@ -12,10 +12,9 @@ if [ -n "$1" ]; then
    if [ "x$1" = "x--stdin" ]; then
        cat > "$logfile"
    else
-       if [ "x$1" = "x-m" ]; then
-           shift 1
-       fi
-       echo "${@#-m}" > "$logfile"
+       sed '1s/^-m \{0,1\}//' >"$logfile" <<-EOF
+           $*
+       EOF
    fi
 else
    logfile=""

Thanks! -- ?anarcat

done --?Joey