improve pre-push hook error message to clarify all uncommitted changes

This commit is contained in:
matt wilkie
2025-11-26 06:50:59 -07:00
committed by Matt Wilkie
parent 7d765c228b
commit eb69da3184
2 changed files with 8 additions and 4 deletions

View File

@@ -45,9 +45,11 @@ done
if [ -n "$FILES" ]; then
# shellcheck disable=SC2086
if [ -n "$(git status --porcelain -- $FILES 2>/dev/null)" ]; then
echo "❌ Error: Beads JSONL has uncommitted changes" >&2
echo "❌ Error: Uncommitted changes detected" >&2
echo "" >&2
echo "You made changes to bd issues between your last commit and this push." >&2
echo "Before pushing, ensure all changes are committed. This includes:" >&2
echo " • bd JSONL updates (run 'bd sync')" >&2
echo " • any other modified files (run 'git status' to review)" >&2
echo "" >&2
# Check if bd is available and offer auto-sync

View File

@@ -45,9 +45,11 @@ done
if [ -n "$FILES" ]; then
# shellcheck disable=SC2086
if [ -n "$(git status --porcelain -- $FILES 2>/dev/null)" ]; then
echo "❌ Error: Beads JSONL has uncommitted changes" >&2
echo "❌ Error: Uncommitted changes detected" >&2
echo "" >&2
echo "You made changes to bd issues between your last commit and this push." >&2
echo "Before pushing, ensure all changes are committed. This includes:" >&2
echo " • bd JSONL updates (run 'bd sync')" >&2
echo " • any other modified files (run 'git status' to review)" >&2
echo "" >&2
# Check if bd is available and offer auto-sync