github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/cli/scripts/validate/check-git-diff (about)

     1  #!/bin/sh
     2  
     3  set -eu
     4  
     5  DIFF_PATH=$1
     6  DIFF=$(git status --porcelain -- "$DIFF_PATH")
     7  
     8  if [ "$DIFF" ]; then
     9      echo
    10      echo "These files were changed:"
    11      echo
    12      echo "$DIFF"
    13      echo
    14      exit 1
    15  else
    16      echo "$DIFF_PATH is correct"
    17  fi;