We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bd092ff + 058dc0c commit 1c057d7Copy full SHA for 1c057d7
pre-commit
@@ -14,6 +14,20 @@ if [ ! -z "$hook_symlink" ]; then
14
subhook_root="$(dirname $hook_symlink)/commit_hooks"
15
fi
16
17
+# If using submodules, we need to read proper subhook root
18
+if [ -f "$git_root/.git" ]; then
19
+ IFS=": "
20
+ while read -r name value
21
+ do
22
+ if [ $name == "gitdir" ]; then
23
+ submodule_hookdir=$value
24
+ fi
25
+ done < "$git_root/.git"
26
+ if [ ! -z "$submodule_hookdir" ]; then
27
+ subhook_root="$git_root/$submodule_hookdir/hooks/commit_hooks"
28
29
+fi
30
+
31
for changedfile in `git diff --cached --name-only --diff-filter=ACM`; do
32
#check puppet manifest syntax
33
if type puppet >/dev/null 2>&1; then
0 commit comments