Blame tools/git-hooks/pre-commit

Packit Service 48484a
#!/bin/bash
Packit Service 48484a
#
Packit Service 48484a
# Creates the file .update_timestamp if the current commit has changed an XML
Packit Service 48484a
# database file.  This is then used by post-commit to update the database
Packit Service 48484a
# timestamp.  You install these scripts by copying them into .git/hooks.  Watch
Packit Service 48484a
# out for existing hooks that you may overwrite there.
Packit Service 48484a
Packit Service 48484a
if [[ -n $(git diff --cached data/db/*.xml) ]]
Packit Service 48484a
then
Packit Service 48484a
    touch .update_timestamp
Packit Service 48484a
fi
Packit Service 48484a
exit 0