#!/bin/sh
#
# A hook script to verify what is about to be committed.
# Called by "git commit" with no arguments.  The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.

# Redirect output to stderr.
exec 1>&2

# Make sure I don't check in my username
bad_files="$( git grep --cached -l $USER */cluster_info.json)"
if [ -n "$bad_files" ]; then
	echo "Error: Committing your username in"
	echo "$bad_files"
	exit 1
fi

