File: pre-commit

package info (click to toggle)
lensfun 1%3A0.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,672 kB
  • sloc: xml: 52,273; cpp: 7,831; ansic: 7,411; python: 1,725; sh: 17; ruby: 16; makefile: 13; javascript: 3
file content (12 lines) | stat: -rwxr-xr-x 392 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
#
# Creates the file .update_timestamp if the current commit has changed an XML
# database file.  This is then used by post-commit to update the database
# timestamp.  You install these scripts by copying them into .git/hooks.  Watch
# out for existing hooks that you may overwrite there.

if [[ -n $(git diff --cached data/db/*.xml) ]]
then
    touch .update_timestamp
fi
exit 0