aboutsummaryrefslogtreecommitdiff
path: root/bin/jfc
diff options
context:
space:
mode:
Diffstat (limited to 'bin/jfc')
-rwxr-xr-xbin/jfc30
1 files changed, 6 insertions, 24 deletions
diff --git a/bin/jfc b/bin/jfc
index 1068280a..be1a3b04 100755
--- a/bin/jfc
+++ b/bin/jfc
@@ -1,24 +1,6 @@
-#!/usr/bin/env bash
-
-# jfc(1) -- Just add everything to a Git repository and quietly commit with a
-# stock message
-
-# Check we have what we need
-hash git || exit
-
-# Detect changes
-if ! git diff-index --quiet HEAD ; then
- changed=1
-fi
-
-# Detect untracked files
-while read -d '' -r ; do
- untracked=1
- break
-done < <(git ls-files -z --others --exclude-standard)
-
-# If either applies, add and commit
-if ((changed || untracked)) ; then
- git add --all || exit
- git commit --message 'Committed by jfc(1)' --quiet || exit
-fi
+#!/bin/sh
+# Commit all changes to a Git repository with a stock message
+# message.
+grc || exit 0
+git add --all || exit
+git commit --message 'Committed by jfc(1)' --quiet || exit