You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

8 lines
197 B

#!/bin/sh
#fail if trailing spaces
if ! git diff --cached --check -- \
':(attr:text)' ':(attr:text=auto)'; then
echo "Error: Remove trailing whitespace from staged changes."
exit 1
fi