diff options
Diffstat (limited to 'Biz/Ide/hooks/post-checkout')
-rwxr-xr-x | Biz/Ide/hooks/post-checkout | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Biz/Ide/hooks/post-checkout b/Biz/Ide/hooks/post-checkout new file mode 100755 index 0000000..e4a0d67 --- /dev/null +++ b/Biz/Ide/hooks/post-checkout @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -e +mktags=${CODEROOT:?}/Biz/Ide/mktags.sh +old=$1 +new=$2 +# filter out only the changed haskell files +mapfile -t changed < <(git diff --diff-filter=d --name-only "$old" "$new" -- '*.hs') +if [[ ! -r tags ]] || [[ ! -r TAGS ]] +then + $mktags "$CODEROOT"/**/* +elif [[ ${#changed[@]} -gt 0 ]] +then + $mktags "${changed[@]}" +fi +direnv reload +## START BRANCHLESS CONFIG + +git branchless hook post-checkout "$@" +## END BRANCHLESS CONFIG |