#!/bin/sh STASH_NAME="pre-push-$(date +%s)" git stash save -q --keep-index "$STASH_NAME" # Format Check if ! cargo fmt; then echo "Error: Code formatting violations detected. Run 'cargo fmt'." >&2 git stash pop -q exit 1 fi # Test Suite # if ! cargo test; then # echo "Error: Test suite failed." >&2 # git stash pop -q # exit 1 # fi git stash pop -q exit 0