#!/bin/sh
#
# jfc - commit all changes to a Git repository with a stock message message

# enter the given directory, default to the current one
cd -- "${1:-.}" || exit

# check if there are any changes; if not, don't proceed (but it's not an error)
grc || exit 0

# add all changes
git add --all || exit

# quietly commit with a stock message and use its exit value as ours
git commit --message 'Committed by jfc(1d)' --quiet
