File: pre-commit.sh

package info (click to toggle)
imagevis3d 3.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 20,816 kB
  • ctags: 43,120
  • sloc: cpp: 125,470; ansic: 83,889; sh: 959; python: 557; perl: 467; xml: 258; makefile: 116
file content (17 lines) | stat: -rwxr-xr-x 618 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# See: http://longair.net/blog/2011/04/09/missing-git-hooks-documentation/

# Check to see if there are any modifications in the ./Tuvok directory.
unset GIT_DIR
unset GIT_INDEX_FILE
CHANGES=`git --git-dir=Tuvok/.git --work-tree=Tuvok status --porcelain`

if [ "$CHANGES" == "" ]; then
  exit 0
else
  echo "[POLICY] You cannot make changes to Tuvok in the ImageVis3D repo.\n"
  echo "Please clone Tuvok separately, make your changes, then update\nthe Tuvok submodule in ImageVis3D. To update the submodule,\nuse 'git checkout master' followed by 'git pull' in the Tuvok\nsubmodule directory."
  exit 1
fi