about summary refs log tree commit diff
path: root/vcs
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2026-10-02 10:33:53 +0200
committerRobert Günzler <r@gnzler.io>2026-10-02 10:45:00 +0200
commit3c588cb48d4d3026c8a00faa8732c0655328e63c (patch)
tree535ea33bf7fbd30e0fef1ebbf2a5c975418d5f14 /vcs
parentf8a7a9ab00efe774f28f8f3211aef90a9abfc6be (diff)
downloadsite-3c588cb48d4d3026c8a00faa8732c0655328e63c.tar.gz
*
Automated-commit-by: commitall
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'vcs')
-rwxr-xr-xvcs11
1 files changed, 10 insertions, 1 deletions
diff --git a/vcs b/vcs
index c1deea8..80f831b 100755
--- a/vcs
+++ b/vcs
@@ -1,6 +1,7 @@
 #!/bin/sh
 set -eu
 [ -n "${DEBUG:-}" ] && set -x
+: "${FORCE:=}"
 
 case "${1:-status}" in
 
@@ -12,7 +13,15 @@ commit)
     shift
 
     # prevent auto-commit of non-web files
-    if git ls-files -md | grep -qvE -e .htm$ -e .html$ -e .md$; then
+    non_web=$(git ls-files -md | grep -vE \
+        -e .htm$ \
+        -e .html$ \
+        -e .md$ \
+        -e .jpg$ \
+        -e .css$)
+    if [ ! $? ] && [ -n "$FORCE" ]; then
+        echo not committing non-web files: >&2
+        echo "$non_web"
         exit 1
     fi