summaryrefslogtreecommitdiff
path: root/Biz/Ide/hooks/post-checkout
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Ide/hooks/post-checkout')
-rwxr-xr-xBiz/Ide/hooks/post-checkout14
1 files changed, 14 insertions, 0 deletions
diff --git a/Biz/Ide/hooks/post-checkout b/Biz/Ide/hooks/post-checkout
new file mode 100755
index 0000000..95b35cd
--- /dev/null
+++ b/Biz/Ide/hooks/post-checkout
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+set -e
+init_tags=$BIZ_ROOT/Biz/Ide/init_tags.sh
+old=$1
+new=$2
+# filter out only the changed haskell files
+changed=($(git diff --diff-filter=d --name-only $old $new -- '*.hs'))
+if [[ ! -r tags ]]
+then
+ $init_tags
+elif [[ ${#changed[@]} -gt 0 ]]
+then
+ $init_tags $changed
+fi