#!/bin/sh set -eu [ -n "${DEBUG:-}" ] && set -x case "${1:-status}" in status) exec git st ;; commit) shift # prevent auto-commit of non-web files if git ls-files -md | grep -qvE -e .htm$ -e .html$ -e .md$; then exit 1 fi git commit --all --trailer=Automated-commit-by:commitall --trailer=signoff --gpg-sign --message=* $* echo git log --stat --format=full -1 echo ;; untracked) shift exec git ls-files -o $* ;; esac