#!/bin/bash
set -e
#set -x
# suppress output for cd
unset CDPATH
if [ -z "$1" ]
then echo NEED DIRECTORY
exit 1
else
cd $1
git status | grep -q '^nothing to commit, working tree clean$'
fi
