diff options
Diffstat (limited to 'vcs')
| -rwxr-xr-x | vcs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vcs b/vcs new file mode 100755 index 0000000..c1deea8 --- /dev/null +++ b/vcs @@ -0,0 +1,33 @@ +#!/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 |