DockerCLI/scripts/validate/check-git-diff

18 lines
232 B
Bash
Executable File

#!/bin/sh
set -eu
DIFF_PATH=$1
DIFF=$(git status --porcelain -- $DIFF_PATH)
if [ "$DIFF" ]; then
echo
echo "These files were changed:"
echo
echo $DIFF
echo
exit 1
else
echo "$DIFF_PATH is correct"
fi;